[UPHPU] MySQL dates
Justin Giboney
giboney at giboneydesigns.com
Wed Aug 8 12:03:13 MDT 2007
In my current mysql db, i have 3 fields one for the day, one for the
month, and one for the year. I need to compare them to the current date.
This is the code I have so far, but it doesn't work.
$sql = "SELECT * FROM Movies WHERE CURDATE() > (DVD_Release_Year,
DVD_Release_Month, DVD_Release_Day) AS theDate LIMIT 0,7";
$result = @mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
echo $row['Movie_Title'] . '<br />';
}
Thanks
Justin Giboney
More information about the UPHPU
mailing list