English
German

MySQL Update

Update Data In a Database

The UPDATE statement is used to update existing records in a table.

Example:

UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value

 

<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("my_db", $con);

mysql_query("UPDATE Persons SET Age = '36'
WHERE FirstName = 'Peter' AND LastName = 'Griffin'");

mysql_close($con);
?>


PHP Tutorial,MySQL Update, MySQL Update example, learn MySQL Update,explain example MySQL Update online free training PHP Tutorial, PHP Tutorial example, learn MySQL Update, online tutorial, download tutorial, PHP Tutorial books, PHP Tutorial videos, live videos PHP Tutorial, learn PHP Tutorial, PHP Tutorial topic MySQL Update, live training PHP Tutorial, download free tutorial