Current course:

MySQL update statement


Description:

An "update" statement is used to update (or edit) the value of an item or items in a table.

The Code:

UPDATE table SET field1='value1', field2='value2', field3='value3'
UPDATE table SET last='Schwan', email='dave.bgsu@gmail.com' WHERE last='Shcwan' LIMIT 1

Or, in php:
mysql_query("UPDATE table SET field1='value1', field2='value2', field3='value3'");
mysql_query("UPDATE table SET last='Schwan', email='dave.bgsu@gmail.com' WHERE last='Shcwan' LIMIT 1");