Forum Moderators: coopster
This does not work (Why?):
$result = @mysql_query("SELECT id, maincourse, veggie, veggie2, fruit, bread, dessert, drink, DATE_FORMAT(day, '%a %b, %D') as date_string FROM $fromwhere WHERE day<=$x AND day<=$z");
note: "WHERE day>$x" does work.
$x = date($_GET['xdate']);
(or is the Date all caps(I don't have the code right in front of me, I'm currently at home and not work the problem just followed me home and I can't get my mind off it)
xdate is entered into the form like (2005-05-05) or (05-5-5) or (5-5-5)
then past with the URL.
This query assumes $fromwhere is set to the table name of the table you want to select from. Also, you need to put the PHP values in single parenthesis like I have above.
--Nick