I've been struggling with this PHP code for a while now. The snippet is here and the parser document is here.
Currently, it looks like
EDIT: The reason for the day=CURRENT_DATE is because I only want to display the entries for today.
Help...
You can find me in #linux/#programming on openIRC, as well as AIM clm100. Responses here are appreciated as well.
Currently, it looks like
Basically the issue is with the day=CURRENT_DATE and the date_format. If I don't format the date then it works fine, but the site looks like ass (2001-12-30). If I format the Date (December 30, 2001) then the day=CURRENT_DATE doesn't work.code:<HR>Code:<?php $db = mysql_connect("localhost","bnc","****"); mysql_select_db("bnc",$db); $result = mysql_query("SELECT date_format(day,%M %d, %Y) as day,announce as announce FROM inf WHERE(day=CURRENT_DATE)",$db); while ($myrow = mysql_fetch_array($result)) { printf ("<center><B>%s</B></center><p>%s</p>\n", $myrow["day"], $myrow["announce"]); } ?>
EDIT: The reason for the day=CURRENT_DATE is because I only want to display the entries for today.
Help...
You can find me in #linux/#programming on openIRC, as well as AIM clm100. Responses here are appreciated as well.