excelsior9
Programmer
Hi guys, I have this code on a page:
$query = "SELECT id,title,author,summary,published,subsection,frontpage,topstory,image1,postdate,date_format(CONVERT_TZ(postdate,'MDT','GMT'),'%d/%m/%y (%T)') AS readable_date FROM content WHERE section='News' ORDER BY postdate DESC";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
[....]
echo "</td>
<td class=\"normalcell\" style=\"width:140px;\">";
echo $row['readable_date'];
echo "</td>
}
Unfortunately the $row['readable_date']; echo is returning a complete blank space... any ideas why? It was working fine before I added convert_tz()
$query = "SELECT id,title,author,summary,published,subsection,frontpage,topstory,image1,postdate,date_format(CONVERT_TZ(postdate,'MDT','GMT'),'%d/%m/%y (%T)') AS readable_date FROM content WHERE section='News' ORDER BY postdate DESC";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
[....]
echo "</td>
<td class=\"normalcell\" style=\"width:140px;\">";
echo $row['readable_date'];
echo "</td>
}
Unfortunately the $row['readable_date']; echo is returning a complete blank space... any ideas why? It was working fine before I added convert_tz()