bidvertiser

Wednesday, October 22, 2008

MySQL Function Reference example code

if (!$link)
{ die('Could not connect: ' . mysql_error());
} mysql_select_db('mydb'); /* Update records */
mysql_query("UPDATE mytable SET used=1 WHERE id < 10");
printf ("Updated records: %d\n", mysql_affected_rows());
mysql_query("COMMIT");
?>

No comments: