Open msushahidullah opened 3 years ago
UPDATE command updates all record in the table DELETE removes all record from table
BEFORE (audit trail): The following code was working nicely to update 'table' row where table_id=$id_value; ($id_value must have a value set) $this->db->where('table_id', $id_value); $this->db->update('table', ARRAY_OF_KEY_VALUE_PAIR );
It manipulated all record in the table
AFTER: (audit trail): The following VERY SAME code updates 'table' all row without setting table_id=$id_value; ($id_value must have a value set) $this->db->where('table_id', $id_value); $this->db->update('table', ARRAY_OF_KEY_VALUE_PAIR );
SAME result for DELETE
It destroyed all record from the table
Did you figureed it out?
UPDATE command updates all record in the table DELETE removes all record from table
BEFORE (audit trail): The following code was working nicely to update 'table' row where table_id=$id_value; ($id_value must have a value set) $this->db->where('table_id', $id_value); $this->db->update('table', ARRAY_OF_KEY_VALUE_PAIR );
It manipulated all record in the table
AFTER: (audit trail): The following VERY SAME code updates 'table' all row without setting table_id=$id_value; ($id_value must have a value set) $this->db->where('table_id', $id_value); $this->db->update('table', ARRAY_OF_KEY_VALUE_PAIR );
SAME result for DELETE
It destroyed all record from the table