DB npt updating?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Deaglex
Forum Newbie
Posts: 24
Joined: Thu Feb 24, 2005 10:15 am

DB npt updating?

Post 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
wyred
Forum Commoner
Posts: 86
Joined: Mon Dec 20, 2004 1:59 am
Location: Singapore

Post by wyred »

Are you triply sure you named the variable $di to store driver_id?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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..
Post Reply