[Solved] Delete not working properly as wanted - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Solved] Delete not working properly as wanted (/showthread.php?tid=67316) |
[Solved] Delete not working properly as wanted - wolfgang1983 - 02-09-2017 I have a column called code which stores a unique id when user previews a post. If code is empty it should not remove the row. But for some reason deletes rows the code column is empty as well. How can I make sure it only removes rows if code is present and has been there for more than 15min PHP Code: public function clear_unconfirmed_post() { I have tried PHP Code: public function clear_unconfirmed_post() { RE: Delete not working properly as wanted - Wouter60 - 02-09-2017 Did you try PHP Code: $this->db->where('code >',''); RE: Delete not working properly as wanted - wolfgang1983 - 02-10-2017 (02-09-2017, 11:43 PM)Wouter60 Wrote: Did you try This has worked now using a foreach loop PHP Code: public function clear_unconfirmed_post() { |