WHERE condition has missed in query |
(07-02-2019, 08:07 AM)php_rocs Wrote: @Sangamesh, We have written the logic of update the query inside our custom model. Custom model then will call to CI model. $this->db->update($this->table_name, $attributes); But even we have logic of updating to other table in another query with where condition as below mentioned $this->db->where(array('id' => $id))->where('active IS NULL')->update($this->table_name, $attributes); We are running these 2 queries inside transaction. When we faced that issue, 2 tables got updated to all the records without WHERE condition in 2 queries. Is there any transaction problem? or our queries tries to update at same time any other queries has loaded? or any other scenarios? Not sure on all these |
Messages In This Thread |
WHERE condition has missed in query - by Sangamesh - 07-01-2019, 09:34 PM
RE: WHERE condition has missed in query - by php_rocs - 07-02-2019, 08:07 AM
RE: WHERE condition has missed in query - by Sangamesh - 07-02-2019, 08:55 PM
|