I get the following error when calling a page loaded in my admin directory in Nuke. It is a custom module I have been working on for awhile now.
Fatal error: Call to a member function on a non-object
$sql = "SELECT uniqueid, u_handle FROM roster_members";
$result = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($result) ) {
$id = $row["uniqueid"];
$name = $row["u_handle"];
The line is the $result = $db-> line in the error message
The top part of this page looks like this.
if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }
$result = sql_query("select radminsuper, radminency from ".$prefix."_authors where aid='$aid'", $dbi);
list($radminency, $radminsuper) = sql_fetch_row($result, $dbi);
if (($radminency==1) OR ($radminsuper==1)) {
switch($op) {
case "milpacs";
milpacs();
break;
}
}
else {
echo "Access Denied";
Any help is appreciated. I am kinda stumped on this. The page used to work before but now I have messed something up.