Welcome Guest, Not a member yet? Register   Sign In
WHERE condition has missed in query

We faced an issue while updating a table record.

We have provided WHERE condition to update 1 record in table. But in query there is no WHERE condition (its missed) while updating for that table. So query has updated all the 20 k records in table.


$result = $this->update($id, TABLE_NAME);

In log:

UPDATE `TABLE_NAME` SET `status` = 1, `user_id` = 322, `updated_by` = 'system'

UPDATE `TABLE_NAME` SET `status` = 1, `user_id` = 322, `updated_by` = 'system' WHERE `TABLE_NAME`.`id` =  '2454'

This logic is there from long time and it was working fine. At particular time the WHERE condition has broken and till now we are not able to replicate the issue.

Messages In This Thread
WHERE condition has missed in query - by Sangamesh - 07-01-2019, 09:34 PM

Theme © iAndrew 2016 - Forum software by © MyBB