Solved: 6 Years, 4 Months, 3 Weeks ago MyBB API fetch all fileNames from my table in my MyBB database.
#1
Solved: 6 Years, 4 Months, 3 Weeks ago
I'm working on a desktop to call my MyBB API and fetch all the files names from my MyBB database. How ever, I've ran into a corner and I am not sure how to solve my problem. this is my PHP code:


        $sql = "SELECT filename FROM `files`";
        $query = $db->query($sql);

        //$query = $db->simple_select("files", "filename");
        //$files = $db->fetch_array($query);

        if(!$files['filename']) {
            return 0;
        } else {
            return $encryptionEngine->init($files['filename'],"encrypt");
        }

and the errors message: 

Fatal error: Call to a member function query() on null in ..... on line 86 

Line 86 is  
query = $db->query($sql);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)