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

(07-02-2019, 08:07 AM)php_rocs Wrote: @Sangamesh,

This seems pretty straight forward. Something has changed to cause this to happen.  Is it possible to see the whole method/function that houses the mentioned query above?  Also, was there any changes made to the code?  Do you have a code versioning tool that is used?  Exactly, when did it stop working and what events happened prior to query not working correctly anymore?

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
Reply


Messages In This Thread
RE: WHERE condition has missed in query - by Sangamesh - 07-02-2019, 08:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB