How example i have table
mytable and model (CActiveRecord) for that table and
i want to update one column value of one record in that table how to do that in proper way?
for example i know:
UPDATE mytable SET myfield = new value WHERE other_field = 1
for that i use
and other situotation how to realize smting like this?
UPDATE mytable SET myfield = CASE other_field WHEN 1 THEN 'value' WHEN 2 THEN 'value' WHEN 3 THEN 'value' END WHERE id IN (1,2,3)
if i want to update a lot of rows with different conditions and diferent values in one sql?
thank you for your time