Quote:
Today at 01:01 PM NTLDR said this in Post #4
Firstly, if you including vB's global.php then there is no need to use mysql_query, use the builtin MySQL functions that coem with vB 
PHP Code:
$threads = $DB_site->query("SELECT * FROM thread");
while($thread =$DB_site->fetch_array($threads)) {
$lastpost = vbdate($dateformat, $thread['lastpost']);
echo "$lastpost<br />";
}
If this code is in a function then make sure you have:
PHP Code:
global $DB_site, $timeformat, $dateformat;
Also note that if the page is outputing templates then the echo isn't likly to output anything to the browser.
|
I am using global.php on this page for user identification purposes, but the above code doesn't print out the dates. Does the page automatically recognize vbdate() when you require global.php?