Hey,
I don’t understand why this SELECT does not work. It is basically retrieving events from a table where the date is more than or equal to the current date. Now if i add an event with the date of March it brings up the event. See this page:
http://www.glofamily.com/inner/index.php
However when i add an event for April, May etc… It doesn’t return anything…
This is the code:
public function selectNextOnStage(){
$sql = "SELECT *
FROM c2_innerglo.tbl_events e
WHERE DAY(date) >= DAY(CURRENT_DATE)
AND archive = 0 AND deleted = 0
ORDER BY date ASC
LIMIT 1";
$result = mysql_query($sql) or die($sql);
if(!$result)
print mysql_error();
return $result;
}
Then i call the function like so:
$event = Event::selectNextOnStage();
$i = 0;
while($row = mysql_fetch_array($event)){
}
?>
Any ideas what i’m doing wrong?
Thanks