View Single Post
Old 07-22-2013, 03:07 AM   #7
Join Date: Dec 2010
Posts: 366

also, I was just thinking, unless someone is actively maintaining the database to crop off old stuff, you may want to put a limit on the events. if they are all future events, you can cut off all old events using this SQL:

it's easy enough to use explode() to convert a date and time into mysql format and back. only thing to take into account is 12-hour crossings. results in about 50-100 lines of code.

I would not use unix timestamps personally, I just use the standard SQL DATE or DATETIME datatype which is based on YYYY-MM-DD HH:MM:SS

DELETE FROM abc_events WHERE somedtcolumn < CURDATE()
at the top of your page to eliminate old events (eliminates chron jobs), and then it's as simple as

SELECT *,MONTH(somedtcolumn) FROM abc_events ORDER BY somedtcolumn,id
Jim Michaels
HTML Code:
browser confusion (I believe the term is 'tag soup')!
jmichae3 is offline   Reply With Quote