I'm wanting to change the mySQL request to ask for all events in the database from today onward. Right now it is just asking for all events only on thdays date. This is what I have:
$query = "SELECT * FROM events WHERE date(convert_tz(StartDate,'+00:00','". $numric_time."'))='$currentDate' AND UserID='" . $_SESSION['userData']['UserID'] ."' ORDER BY StartTime"; //getting date's agendas
Thanks!
If you need the timezone offset, change the query to use
CURDATE() +/- INTERVAL x HOUR
, wrapping theStartDate
in a function such asCONVERT_TZ
causes MySql not to use any index on that column.