PHP basic operations for a database--update data
Main statement: $update = mysql_query ("Update user set password= ' abc ' where username= ' 123 '");
This means, update the user table, set the value of the password field to ABC, and filter the data to be username to 123. is to modify the user table inside the username for the 123 field inside the password, the value of password is ABC.
In the previous essay, I forgot to say where this is, this I understand as a filter, where the following is the condition you want to filter.
As an example:
SELECT * from user where username= " Tiaojian"
Query data table user inside the content of the username field. Where is the meaning of the filter.
At this time Echo $update, if successful, will return 1, using this 1 for future code.
( This can be used to change the password )
PHP basic operations for a database--update data