-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
When I build up a query with a subquery and use a copy the first query will be good but the second query will miss the subquery itself.
Example:
$dbi_sub = $dbi->subQuery();
$dbi_sub->where('mycompany_members.active',1);
$dbi_sub->get('mycompany_members',null,'member');
$dbi->where('members.id',$dbi_sub,'IN');
This one works
$cnt = $dbi->copy();
$count_members = $cnt->getOne('members',"COUNT(members.id) AS count");
snip: members.id IN ( (SELECT member FROM mycompany_members WHERE mycompany_members.active = 1 ) )
This one does not
$data = $dbi->get('members',array($limit_from,$itemsperpage),array("array","off","colums"));
snip: members.id IN ( () )
Metadata
Metadata
Assignees
Labels
No labels