update sentence help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eeau1973
Forum Commoner
Posts: 27
Joined: Sat Aug 19, 2006 4:49 pm

update sentence help

Post 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
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Remove the comma before the WHERE clause. Also, see what mysql is telling you with mysql_error().
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply