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..."
#2

[eluser]Randy Casburn[/eluser]
@rbxbx,

Hi and welcome to CI. The db object discussed here http://ellislab.com/codeigniter/user-gui...eries.html in the docs returns a standard DB object that you can run through your foreach loop construct.

Looks to be a simple scope problem: $this references what exactly? You've not exposed us to the object that the Datatype_Exists method is a member of.

$this->db->query() assumes access to the CI super object. If we don't have direct access in our methods, we usually use the get_instance() method to create a reference to the CI super object thus:

Code:
$this->CI = & get_instance();
$this->CI->db->query('SHOW TABLES');

Hope this is helpful.

Randy


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:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB