Quote:
Originally Posted by WildEye
I've been trying to get this to work now, as posted in #18, but i'm getting an error message:
Fatal error: Call to a member function on a non-object in /home/n4f/html/calendarexport.php on line 3
What am i doing wrong? Not very familiar with what to do... Shouldn't my databasename be somewhere? or... Any help appreciated.
PHP Code:
echo "<hr><b><a href=\"http://www.mysite.com/forum/calendar.php?\">Latest Events</a> . . .</b><b><p>";
$events = $DB_site->query("select * from event order by dateline DESC limit 5");
if ($DB_site->num_rows($events))
{
while ($ev = $DB_site->fetch_array($events))
{
$new_date = vbdate('m.d.Y', $ev['dateline'], false, false);
$link_date = vbdate('Y-m-d', $ev['dateline'], false, false);
$news .= "<b>".$new_date."</b>"."<BR>";
$news .= "</b>".$ev['title']."<BR>";
}
}
echo "<A HREF=\"/forum/calendar.php?do=getinfo$ev[eventid]&day=$link_date&c=1\">$news</A>";
|
Hi,
the DBsite command is using the SQL PHP class from VBulletin. If you have included the global.php you should not have the problems you have. Keep in mind that you have to change the directory to include the global.php if you are not in your forum home directory.
Cheers,