Find jobs - Wordpress Theme - Wordpress Theme - Winunited Bonuses - Web Hosting

PDA

View Full Version : Vbulletin Recent threads query


romeo2010
Apr 3rd 2008, 12:46 pm
using this code i try to display the threads on another page

<?php

chdir(public_html/forums);
require_once('./global.php');

$threads = $db->query_read("
SELECT title FROM " . TABLE_PREFIX . "thread
ORDER by dateline DESC
LIMIT 0,5
");
while ($thread = $db->fetch_array($threads))
{
echo $thread['title'] . "<br />";
}
?>



but this give me tfollowing error

Fatal error: Class 'App' not found in /home2/public_html/forums/global.php(360) : eval()'d code on line 1

any idea how to fix that?

MOUPAP
Apr 4th 2008, 4:20 am
shouldn't "thread after TABLE PREFIX be "thread" ??:confused:

jayshah
Apr 4th 2008, 4:23 am
The error is within the global.php's code, not yours. You will need to fix that file first. The chances are you need to include more files, one of them being that required class.

Edit: Alternatively, place your chdir() command's parameter in quotes or apostrophes. E.G.

chdir('the/directory');

Jay