To change the data in the table, the following steps:
1. Log in to MySQL SERVER
• This function is used:
Mysql_connect ();
Example: mysql_connect ("localhost", "root", "");
• To keep the value of the function can be invoked over the connection and use hold its value, then the above command put into a variable. The results are as follows (in the example the variable variable named "connection"):
$ connection = mysql_connect ("localhost", "root", "");
2. Activate / select the database that will be used
• To activate / select the database to be used, its function is:
Mysql_select_db ("namadatabaseanda");
3. Perform query (UPDATE)
• Functions are used:
Mysql_query ()
• SQL Query command to change the data into the table:
Update [nama_table] SET [field1 = new nilai_field1],
[field2 = new nilai_field2],
[field n = nilai_fieldn new]
Where [condition];
May be useful > _ <
Post a Comment