CodeIgniter Forums

Full Version: Active record problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]dimis[/eluser]
I have a controller that call one after the other 2 model functions that make queries at database with a db->where clause.
It seems that at 2nd function exists the db->where of the previous function because the query failed with
Quote:Unknown column 'id' in 'where clause'
where id is at previous function.
How can I fix it?

El Forum

[eluser]xwero[/eluser]
This can mean two things
- you use the cache functions and you haven't used the flush_cache function
- you forgot to complete the sql statement, using functions like get/insert/update/delete, in the previous function

El Forum

[eluser]dimis[/eluser]
I solve it I had the $this->db->where after the $query = $this->db->get, I change the order.