Welcome Guest, Not a member yet? Register   Sign In
How to reset active record database query?
#1

[eluser]ZachWills[/eluser]
As the title says! I run a query once in my function, then when I run it again but with a different where() parameter it outputs as though I had both parameters! I want it to reset... here is the example:

Code:
$this->CI->db->select('*')->from($this->_table_name)->where("which_reply", $row->id);

Code:
$replyQuery = $this->CI->db->get();

The above code is running through a loop so it gets used multiple times, each time it is supplied with a new $row->id value... but the output treats it as though I am compounding my where statement.

Does anybody have any clue as to how to reset the database query so I get the correct results?


Messages In This Thread
How to reset active record database query? - by El Forum - 08-28-2012, 03:30 PM
How to reset active record database query? - by El Forum - 08-28-2012, 04:14 PM
How to reset active record database query? - by El Forum - 08-28-2012, 04:29 PM
How to reset active record database query? - by El Forum - 08-28-2012, 05:44 PM
How to reset active record database query? - by El Forum - 08-28-2012, 09:24 PM
How to reset active record database query? - by El Forum - 08-29-2012, 04:38 PM
How to reset active record database query? - by El Forum - 08-29-2012, 04:46 PM
How to reset active record database query? - by El Forum - 08-29-2012, 06:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB