Welcome Guest, Not a member yet? Register   Sign In
Active record re-use
#1

[eluser]umbungo[/eluser]
How can i re use an active record call?

eg. i do

foreach($something as $thing){
$this->db->where('a', $thing);
}
$query1=$this->db->where('b','2')
->get('table');

$result=$query->result();

and then i want to do something like $query2=$query1->db->where('c', '3') ->get('table') and then perhaps $query3=$query1->db->where('d', 4)...

how do i do this without rewriting all of the first query?
#2

[eluser]umbungo[/eluser]
no one? Surely this is possible and not too complicated?? is anything unclear in my post or something?
#3

[eluser]InsiteFX[/eluser]
Create a method in a Model and call it!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB