$this->db->update('page', $data)->where -- Not working |
[eluser]EEssam[/eluser]
Hello, Why method chaining is not working for me when trying to update? Is it only available for select statements? http://ellislab.com/codeigniter/user-gui...tml#update Please clarify.
[eluser]mglinski[/eluser]
Your chaining in reverse. Try this: $this->db->where('id, $id)->update(’page’, $data); For Refrence: Any db command that inserts, updates or deletes data goes last in a chain, right before you retrieve the result of the query. This should be quite obvious but is often confused for the newbies. -Matt
|
Welcome Guest, Not a member yet? Register Sign In |