Couple itsy bitsy PHP errors

DrPepper

I drink myself on a regular basis get over it
Jul 14, 2012
205
28
Unfortunately I do not read PHP :/

Warning: mysqli::query() [ ]: Couldn't fetch DatabaseManager in C:\xampp\htdocs\engine\classes\class_core.php on line 7

Warning: LightCore::getServerStat() [ ]: Couldn't fetch DatabaseManager in C:\xampp\htdocs\engine\classes\class_core.php on line 14
LightCMS MySQLi Engine Error


Class_Core.PHP:

Code:
<?php
 
    class LightCore {
        public function getServerStat($var) {
            global $db, $core;
            $this->query = "SELECT `" . $var . "` FROM `server_status`";
            if($this->result = $db->query($this->query)) {
                while($this->data = $this->result->fetch_row()) {
                    $this->return = $this->data[0];
                    return $this->return;
                }
            }
            else {
                $db->databaseError($db->error);
            }
        }
    }
?>
 

Users who are viewing this thread

Top