This query will format the date stored in my database. When I run it at the mysql prompt, I get:
February 20 2009
$sql2 = "select max(DATE_FORMAT((FROM_UNIXTIME(date) + INTERVAL -18000 SECOND), '%M %d %Y')) as date from mytable where id = 1077";
But, when I print it out:
$res2 = db_query($sql2);
while($maxdate = db_fetch_array($res2)) {
$output .= '<td>'.$maxdate['date'].'</td>';
}
It prints out:
February 0 2009
Am I missing something? Do I have to do something special here?