I am not a programmer or anything cool like that. I am a geek who just knew how to read a SQL DB and get this thing working under vB3
So here is the code: (EDIT - Corrected a major error in the code date setup due to vb3)
PHP Code:
$events = $DB_site->query ("SELECT UNIX_TIMESTAMP() AS dateline, dateline_from, eventid, title
FROM event
WHERE calendarid = 1 AND dateline_from > dateline
ORDER BY dateline_from LIMIT 4");
dateline_from is the vb3 variable for the starting date of the event, and am defining the field dateline for the current date and getting a unix timestamp to so the comparison in the
where is more reliable ( had some issue with YYYY-DD-MM formats). Then later with a string like this:
PHP Code:
$timestring=$event['dateline_from'];
$dateevent=date("M j,Y",$timestring);
I convert the dateline_from into a readable format.
works like a freaking charm