Updating Data into MySQL Database



Data can be updated into MySQL tables by executing SQL UPDATE statement through PHP function mysql_query.

Below is a simple example to update records into employee table. To update a record in any table it is required to locate that record by using a conditional clause. Below example uses primary key to match a record in employee table.

Example

Try out following example to understand update operation. You need to provide an employee ID to update an employee salary.


   
   
      Update a Record in MySQL Database
   
   
   
      
               
Employee ID
Employee Salary
   
 
php_and_mysql.htm
Advertisements