can any one please provide the codeigniter equivalent of this above code
UPDATE table SET 'status_field'=IF(id=4, 1, 0)
the code will toggle all values of status_field
to 0
and for the the specified row (with id=4
) sets the status_field
to 1