1 kraemers Feb 14, 2005 05:20
3 kraemers Feb 14, 2005 21:59
I want to be able to do something like this, but I know it's the wrong code format (post_issue_date and post_mod_date are both date formats).
<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'my_blog', 'blog')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_blog') or die('Could not select database');
// Performing SQL query
$query = 'UPDATE `evo_posts` SET `post_issue_date` = ''echo date("Y-m-d H:i:s");'', `post_mod_date` = ''echo date("Y-m-d H:i:s");'' WHERE `ID` = ''52'' LIMIT 1';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Closing connection
mysql_close($link);
?>
the time you want to show is not the time the post is 'posted' but the time on your computer.
So why not show the computer time ?