In my table I have some rows with same 'stock_id', and need update with 2 conditions, but don't work, just update all rows with value 1
$this->db->query('UPDATE stock_table SET size = IF(kit = \'n\', 1, (1 * 10)) WHERE id = '.$row->stock_id);
But my size have S - M - X with same stock_id
Eg: I need update qtde column where stock = 13 and size = S