CI 3.1.0 multi delete and update, is a bug? |
In a method I have two queries, the first performs a delete on two tables and everything works well.
After I have a second query to update another table in this way: PHP Code: // Delete The update query fails because it inherits the where clause of the delete query like this: …WHERE id_pdv = 123 AND id = 123 This only happens if the delete query receives multiple tables. To get the expected result is necessary: 1) Run two separate delete or 2) Use the delete this way: PHP Code: $this->db->delete( ['table_1','table_2'], ['id_pdv' => (int)$id] ); or 3) Perform PHP Code: $this->db->reset_query(); before the update I'm wrong, or is it a bug? Thanks |
Welcome Guest, Not a member yet? Register Sign In |