Page 1 of 1

update sentence help

Posted: Sat Sep 15, 2007 1:35 pm
by eeau1973
Hi .. would somebody please help me with these sentence ... (i'm trying to update a record using a web form )

Code: Select all

mysql_query("UPDATE table_data
SET id='$ud_description', field1='$ud_text2', WHERE id='$ud_description'");
My problem is that the database (the fields of the record) is not affected with this code ...

Thanks a lot

Posted: Sat Sep 15, 2007 1:37 pm
by s.dot
Remove the comma before the WHERE clause. Also, see what mysql is telling you with mysql_error().