PHP Basic
PHP Advanced
PHP Database
| MySQL Update |
|
The UPDATE statement is used to modify data in a table. Update Data In a DatabaseThe UPDATE statement is used to update existing records in a table. Syntax
To learn more about SQL, please visit our SQL tutorial. To get PHP to execute the statement above we must use the mysql_query() function. This function is used to send a query or command to a MySQL connection. ExampleEarlier in the tutorial we created a table named "Persons". Here is how it looks:
The following example updates some data in the "Persons" table:
After the update, the "Persons" table will look like this:
|
MySQL Update