Welcome Guest, Not a member yet? Register   Sign In
[updated!] I just took over this project..."Fatal error: Call to a member function result_array() on a non-object in..."
#1

[eluser]rbxbx[/eluser]
edit:

But now it’s a brand new error fest…

Screencap of errors

Hello All,

I've just taken over a project from another programmer, who left the migration of the application/site up to the client. It looks as though all has been transferred well (as CI seems easy to migrate).

I'm pretty familiar with php, however have never used CI before.

After changing .htaccess due to a 500 error, php is now throwing this error...

Quote:Fatal error: Call to a member function result_array() on a non-object in /data/18/1/11/157/1663320/user/1793798/htdocs/public_html/system/application/models/cms_data.php on line 133

here is the code that caused the error... (according to the error report)
Code:
function Datatype_Exists($typename)
    {
        $res = $this->db->query("SHOW TABLES");
        foreach($res->result_array() as $row)
        {
            foreach($row as $tmp) if($tmp == "type_".$typename) return true;
        }
        return false;
    }

searching google and the forums has been of little help so far, although I did find one similar thread...

Any help would be greatly appreciated!

ps: I'm glad this project is forcing me to finally look into CI, seems a good deal better than your other PHP frameworks!


Messages In This Thread
[updated!] I just took over this project..."Fatal error: Call to a member function result_array() on a non-object in..." - by El Forum - 10-08-2008, 09:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB