Updating mysql database with php
The general format of the My SQL query to update a My SQL table is shown below.
So this My SQL code above updates a table named table_name, setting a column name equal to a certain value where a certain column is equal to a value.
The first part of the update script uses the single record selection from last week but adds a little HTML to it to make it more useful.
we need updation in this table as devesh change to dev and his mobile number also need to be changed.
here first we create connection with the database,then database is selected using mysql_select_db(), then update query is passed to the mysql_query( ) and the database table is updated.
This is how the code knows which table in the database we want to update.
After this, we use the SET keyword to set a certain column equal to a certain value where a certain column is equal to a certain value so that we know which row to update.