I actually managed to get this working, eventually, but just discovered that it's showing old events that are already past. Eep! I've checked over the code, and it looks like it should be working correctly, but I'm definitely getting old events.
I checked the sql query in phpmyadmin, and I get the same results. The query is:
Code:
SELECT UNIX_TIMESTAMP( ) AS dateline, dateline_from, eventid, title
FROM event
WHERE calendarid = 1 AND dateline_from > dateline
ORDER BY dateline_from
LIMIT 5
and in phpmyadmin when I run this I get the same events as I do in the script. Here are the dateline and dateline_from values from the five events returned:
Code:
dateline dateline_from eventid title
1075968522 1074603600 1 Hernando Beach Blast III
1075968522 1074704400 3 HBBIII 2004
1075968522 1077840000 11 Hinkster's Birthday
1075968522 1082246400 12 Michigan NCRS Swap Meet
1075968522 1083283200 7 New England Chapter Event
I can see that the dateline value being returned appears correct...it's the same for each row returned. But event 1 and event 3 were in January, and clearly their dateline_from values are less than the dateline values. So why are they being returned?
*confused*