Welcome Guest, Not a member yet? Register   Sign In
set all values in a table field with active record?
#1

[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
#2

[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));
(Not tested)
#3

[eluser]antonumia[/eluser]
thanks, worked a treat!




Theme © iAndrew 2016 - Forum software by © MyBB