My setup is as follows:
Table 'data': 'title','body',...,'user_id',...
Table 'users': 'user_id','some_val'...
Basically I want to somehow join the tables 'data' and 'users' on the user_id field so that I can pull 'some_val' from the 'users' table. My problem is that not every user_id in the 'data' table has a corresponding entry in...
I'm working on iPhone app that will let users upload/download photos to/from a DB server along with some data associated with each photo.
While I do have experience with iPhone programing, I do not have much experience with DB and server side programing.
Does anyone have any tips on what would be the easiest way to set up DB server...
Before i start id like to say ive posted this question as more of a discussion rather than Problem Question.
In my Database i have news posts lets say with 3 columns (Id, title, date). Wher Id and title are self Explanitory the date is stored in mktime() values, in other words the number of seconds passed since 1 January 1970.
Now what...
Hello, I'm trying to format the file name for outfile using row data.
I've tried the following with no success:
SELECT t1.field1
FROM table1 t1
LIMIT 1
INTO OUTFILE CONCAT( '/my_path/', t1.field2, '.txt' );
Can anyone recommend alternatives?
Thanks
...
I am building an object oriented wrapper for sql using mysqli - thats neither here nor there. I'm trying to use error numbers to detect if a database/table/column doesn't exist. Things would all be fine and dandy if I didn't receive error number 656434540.... Of course the error message is "bo.boo' doesn't exist". Its SUPPOSED to read "T...
If we look at the stackoverflow website we have votes. But the question is what is the bestway to store who has voted and who has not. Lets also simplify this even more and say that we can only vote Up, and we can only Remove the Up vote.
I was thinking having the table to be in such form
question - Id(INT) | userId(INT) | title(TEX...
Suppose I have developed one web portal in PHP/MySQL. I want to make it work in mobile also. What is the easiest way to do this?
Can we use PHP with any mobile based mark up languages like WML or XHTML i.e. as we can use PHP with HTML in web applications used to view in normal web browsers?
...
I have a table named user_ips to keep track of users in case they delete their cookies or change browser. So anyway, the following code is simple. It updates entries in user_ips that are equal to the user's id and IP. If the query did not update any rows, then it means that IP for that user is not in the table, so it inserts it.
$site->...
I have the following subroutine in a classic ASP class that calls the ADO UPDATE method. I'm using mySQL db using ODBC driver 5.1.
If I all the subroutine I get the following error:
Microsoft Cursor Engine error '80004005'
Key column information is insufficient or incorrect. Too many rows were affected by update.
Public Sub Update(tab...
Considering that everyone is always worried about User Data (And Rightly So), would it be sufficient to simply loop through each external array when you get it, and apply a mysql_real_escape_string().
I'm curious to if this is a bad idea.
Something like:
function getExternalData($type='GET')
{
$type = strtoupper($type);
$dat...
So I'm trying to adopt good object oriented programming techniques with PHP. Most (read all) of my projects involve a MySQL database. My immediate problem deals with the users model I need to develop.
My current project has Agents and Leads. Both Agents and Leads are Users with much of the same information. So, obviously, I want a clas...
Hello, I'm trying to join two tables. The first table has a list of 11 items which are 'site_names' with an auto id field of 'id'. The second table that I want to connect has an auto id field of 'desc_id' and another field of 'descriptions'. This second table currently has 3 rows of data that I want displayed only for id 1 in table 1.
...
How do I routinely kill MySQL queries that have been alive for "too long"?
Is there a system information table of sorts that shows all current queries, and their age?
Edit: updated question from "killing connections" to "killing queries"
...
I have a JSP MySQL query
<sql:query var="libraries" dataSource="jdbc/ArabiTagOnline"><br>
SELECT l.LibraryId, v1.LAvalue AS "dbESTid", v2.LAValue AS "LibName", v3.LAValue AS "Desc"
FROM ((Library l LEFT JOIN LibAttrValue v1 ON l.LibraryId = v1.LibraryId AND v1.AttributeId = 1)
LEFT JOIN LibAttrValue v2 ON l.LibraryId = ...
I'm using asp.net together with mysql and my site requires some quite heavy calculations on the data. These calculations are made with mysql, I thought it was easier to make the calculations in mysql to just be able to work with the data easy in asp.net and databind my gridviews and other data controls not using that much code.
But I s...
I have two servers:
Server A: MySql
Table A
key-a
foreign-key-b
Server B: MsSql
Table B
key-b
foreign-key-a
Presumably I have two objects with methods that handle the relationships:
TableA->getRelatedTableB();
TableB->getRelatedTableA();
This is easy to implement in most ORMs. But what if I want to get a large set of objec...
Hi,
I'm developing a project, and I'm debating if I should get plain old regular hosting, or something more expensive, like VPS.
Here are my needs:
Zend Framework
Sphinx Search
jQuery
ImageMagick/GraphicsMagick/GD
PHP 5 + MySQL
At what point do I need VPS? I'd rather obviously to pick the cheapest option..
Thanks.
...
How can I validate a MySql query before executing it?
...
I'd like to test a situation, but I need to add a dummy row of data to test the hypothesis. So, according to this mySQL manual page for SELECT INTO, my query is correct:
SELECT INTO courses.sections_rfip
(SectionID, CourseID, SectionNumber, Term, Credits, CutOffDate, StartDate, EndDate, LastDateToWithDraw, ContinuousIntake, AcceptsRe...
Hi,
I'm working on VS2005 and have tried using MySQL's ODBC to connect to a database.
The problem is that when I get to the part of choosing which tables to use, there are no tables and the only selectable thing is a View, which has no name and is null (of course something like this doesn't really exist in the DB). I tried adding a Table...