FlyingDutchman
09-16-2002, 06:58 PM
i have some problems :(
i have this script:
$threadz = $DB_site->query("SELECT title,originalforumid,threadid FROM thread WHERE forumid='5'");
if (!$DB_site->num_rows($threadz)) {
print '<br>No threads found.</b>';
} else {
while ($thread_info = $DB_site->fetch_array($threadz)) {
extract($thread_info);
$forumd = $DB_Site->query("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
print '<br><b>'.$thread_info[title].'</b> - <a href="../postings.php?action=restore&threadid='.$thread_info[threadid].'&s='.$session[sessionhash].'">[restore]</a>'.$thread_info[originalforumid].'';
}
}
it's working o.k, except for 1 line:
$forumd = $DB_Site->query("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
it just keeps on giving me this error:
Fatal error: Call to a member function on a non-object in c:\file-x.php on line 31
I've already asked Xenon for help, but he doesn't know what the problem is either...
Thanks for any help you can give me,
FlyingDutchman
P.S. originalforumid is from type smallint(5) unsigned if that possibly matters (guess not, but ok)
i have this script:
$threadz = $DB_site->query("SELECT title,originalforumid,threadid FROM thread WHERE forumid='5'");
if (!$DB_site->num_rows($threadz)) {
print '<br>No threads found.</b>';
} else {
while ($thread_info = $DB_site->fetch_array($threadz)) {
extract($thread_info);
$forumd = $DB_Site->query("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
print '<br><b>'.$thread_info[title].'</b> - <a href="../postings.php?action=restore&threadid='.$thread_info[threadid].'&s='.$session[sessionhash].'">[restore]</a>'.$thread_info[originalforumid].'';
}
}
it's working o.k, except for 1 line:
$forumd = $DB_Site->query("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
it just keeps on giving me this error:
Fatal error: Call to a member function on a non-object in c:\file-x.php on line 31
I've already asked Xenon for help, but he doesn't know what the problem is either...
Thanks for any help you can give me,
FlyingDutchman
P.S. originalforumid is from type smallint(5) unsigned if that possibly matters (guess not, but ok)