Results 1 to 6 of 6
Thread: Query returns wrong rows
Feb 25, 2005, 22:05 #1
- Join Date
- Jan 2005
- 0 Post(s)
- 0 Thread(s)
Query returns wrong rows
Hi everybody, my name is James. Long time lurker, first time poster, I try to visit the site daily and have learned lots from it...
Anyway, I have a php script that querys a MySQL database and returns a list of current events, I'm trying to only return events that are > or = to the current date. But it returns rows that have a previous date.
Here are the relevent parts of the code.
$curdate = time();Code:
$events = @mysql_query("SELECT * FROM Events, Authors WHERE $curdate<=Events.Event_Date AND Events.Author_ID=Authors.AID ORDER BY Events.Event_Date ASC LIMIT 10");