I have the following PHP script to update two time/date fields in the database.
When i run this the fields are not updated.
Can anyone see where i m going wrong.
PHP Code:
<?php
$con = mysql_connect("localhost","dbname","dbpassword");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db("my_db", $con);
mysql_query("UPDATE msm_content SET created = '2011-01-02 00:00:00', modified = '2011-01-01 00:00:00'");
echo 'Query Updated successfully';
mysql_close($con);
?>
Your guidance is much appreciated.
Chris