Page 1 of 1

DB npt updating?

Posted: Thu Feb 24, 2005 11:58 pm
by Deaglex
I'm confused why mySQL isn't getting this query.

Code: Select all

$query = mysql_query("UPDATE table SET points='$p' bonus='$b' penalty='$pen' total='$t' WHERE driver_id='$di'");
	mysql_query($query);
All the variable are set I made sure of that. And the DB is connected.....
I am very new to mySQL, tried to search but every time I got about 9000+ records to look at.

TY

Posted: Fri Feb 25, 2005 12:18 am
by wyred
Are you triply sure you named the variable $di to store driver_id?

Posted: Fri Feb 25, 2005 12:44 am
by feyd
you need to seperate each field-value combination with a comma.

If you use

Code: Select all

mysql_query($query) or die(mysql_error());
you'll find out..