![]() |
set all values in a table field with active record? - 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: set all values in a table field with active record? (/showthread.php?tid=18599) |
set all values in a table field with active record? - El Forum - 05-12-2009 [eluser]antonumia[/eluser] hi, Is it possible to do the following with active record? UPDATE table SET field=0; i have a version field in some tables that I need to be able to reset. thanks, anton set all values in a table field with active record? - El Forum - 05-12-2009 [eluser]Dam1an[/eluser] Although I've not tried it, it should work if you don't put the where clause in Something like: Code: $this->db->update('table', array('id'=>0)); set all values in a table field with active record? - El Forum - 05-12-2009 [eluser]antonumia[/eluser] thanks, worked a treat! |