Sessions not working properly with database where clause - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Sessions not working properly with database where clause (/showthread.php?tid=20065) |
Sessions not working properly with database where clause - El Forum - 06-26-2009 [eluser]lennierb5[/eluser] So I have a filter / search function that checks if post data exists and then adds a $this->db->where clause and then eventually executes the query at the end. I also want to set session data but what happens is when I set session data AFTER a $this->db->where it tries to include that in the session update to the database. Example: Code: if ($this->input->post('accountnumfilterentry')) { Will produce the error: Code: A Database Error Occurred If you put it before the where clause it processes fine but then gets hung up in the next set of IF statements if is more than one filtered item. |