Updating data in mysql
Transact-SQL server cursors also support updating data at the current row of a cursor.
Once data has been added to a My SQL database table, it is invariably necessary to delete or update some or all of that data.
This requires the use of multiple column = value expressions in UPDATE statement.
For example, we can easily extend our previous example to update the prod_name and prod_desc columns of our products database table: If an UPDATE statement is designed to update multiple rows, and an error is encountered attempting to update some of those rows, the entire update is canceled and any rows that had been changed are reverted to their original values.
In this blog post we will show you how to update previously stored information in database using PHP.
It is also possible to update multiple columns with a single UPDATE statement.
The following SQL statement is designed to change the product description column of a row in a table where the prod_id column is equal to 12134.