Drakkon
Diamond Member
Say I have a table with events structured such that:
-----------------------------------------------------------
Event
---------
start int - unix timestamp --the starting day/time of the event
end int - unit timestamp -- the end time of the event
repeating enum('none','day','week','month','year')
------------------------------------------------------------
and I want to select all the events that occur (or re-occur) within April
Is it possible in one query to get all the events that occur within those given timeframes (given by the repeating column)? or how would i go about separating the calls to optimize my number of gets? Or is there a better way to store the start/end days/times to achieve this? I don't want to insert more rows than necessary.
-----------------------------------------------------------
Event
---------
start int - unix timestamp --the starting day/time of the event
end int - unit timestamp -- the end time of the event
repeating enum('none','day','week','month','year')
------------------------------------------------------------
and I want to select all the events that occur (or re-occur) within April
Is it possible in one query to get all the events that occur within those given timeframes (given by the repeating column)? or how would i go about separating the calls to optimize my number of gets? Or is there a better way to store the start/end days/times to achieve this? I don't want to insert more rows than necessary.