Playing with time stamps and mysql
Posted: Wed Feb 12, 2003 10:37 am
I've been Playing with time stamps in php and mysql, more trying to pull them into php,
But I get the current time and stuff, not what i'm pulling off of mysql....
The time stamp I've been using is: 8,0,0,1,21,2003: wich is saved in a tinytext format in mysql and works fine when I use it like :
and get :Tue the 21st of January, 2003:
Could some one tell me what i'm doing wrong please?
I know its something simple and basic.. but I've been beating my head against the wall trying to figure it out....
Thank you for the hand.
Code: Select all
<?php
$result1 = mysql_query($query1, $connection) or die(mysql_error());
echo '<table border="1">';
while ($row = mysql_fetch_assoc($result1)) {
$bob = $row["date"];
$dogy = date ('D \t\he dS of F, Y', mktime('$bob'));
echo '<tr><td>',$dogy,'</td></tr>';
}
echo '</table>';
?>The time stamp I've been using is: 8,0,0,1,21,2003: wich is saved in a tinytext format in mysql and works fine when I use it like :
Code: Select all
<?php
$date = date ('D \t\he dS of F, Y', mktime(8,0,0,1,21,2003));
print("$date");
?>Could some one tell me what i'm doing wrong please?
I know its something simple and basic.. but I've been beating my head against the wall trying to figure it out....
Thank you for the hand.