Welcome Guest, Not a member yet? Register   Sign In
A Base Model Template
#11

[eluser]pistolPete[/eluser]
[quote author="ngocthai" date="1236170485"]"Call to a member function list_fields() on a non-object"[/quote]

Dabase wasn't loaded. Probably because of a misconfiguration.
What values are you passing to the function load_table() ?
First one should be the table name, the second one a group name (see here).
#12

[eluser]Johan André[/eluser]
Hmm... thats weird!
What version of CI do you use?
I kindof remember that the list_fields()-method changed name in some release... Not sure though...
#13

[eluser]pistolPete[/eluser]
Changelog - Version 1.5.0:
Quote:Deprecated $this->db->field_names() USE $this->db->list_fields()

Using list_fields() is correct.
The error message he got wasn't indicating a missing function but a non-object.
#14

[eluser]Johan André[/eluser]
Ofcourse...

Maybe he did'nt load the database-library?




Theme © iAndrew 2016 - Forum software by © MyBB