MySQL refresher

datatypes:

http://w3schools.com/sql/sql_datatypes.asp

Order results by 2 columns:

SELECT column_name(s)
FROM table_name
ORDER BY column1, column2

Simple delete:

<?php
$con = mysql_connect(“localhost”,”peter”,”abc123″);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db(“my_db”, $con);
mysql_query(“DELETE FROM Persons WHERE LastName=’Griffin'”);
mysql_close($con);
?>

Comments are closed.