I am having some problems converting the datetime from the rows in my database to the format I want. I am using the following code:
<?php
$query = @mysql_query("SELECT * FROM animereview WHERE animeid = '$id' ORDER BY id");
while ($data = @mysql_fetch_object($query)) {
?>
HTML CODE HERE
<?php
$date = date ("d.m.Y" , $row->date);
echo($date);
?>
MORE HTML
<?php
}
?>
In the database the datetime (field=date) in the two different rows (only tested as of now) are: 2003-05-30 19:53:48 and 2003-05-30 19:53:56
Yet no matter what the date is when running the script the date: 31.12.1969 is always displayed, even when I modify the datetime it still remains the same. If anyone has any suggestions as to what I may be doing wrong I would greatly appreciate it.