so here is my situation:
I use vBulletin, and I am creating a small modification... For now all i want to do is to query & display the upcomming events in the calendar.... The problem is that dates in the database are unix-encoded and it returns weird numbers like 339847987498 as dates.. So i have to use the vBdate(); function to display the date correctly.
here is the code:
$query = "SELECT e., t., p.* FROM event AS e, thread AS t, post AS p WHERE t.forumid = 16 AND t.threadid = p.threadid AND p.parentid = 0 AND e.eventid = t.lv_vb_eventforums_eventid ORDER BY dateline DESC LIMIT 10";
$res = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($res)) {
$dateline = $row["dateline_from"];
$newdate = vbdate($vbulletin->options['dateformat'], $dateline, 0);
What i want to do is to "ORDER" the query by dates (from the field DATELINE).
Normally i would have just added ORDER BY dateline DESC but since the dates are encoded and needs to be passed through vbdate(); first it won't work...
i'm a bit confused i don't know how to proceed... help would be appreciated
thanks!