hi all, I need help to to this in one request in order to perform the
code :
This is the actual requests :
$c = new Criteria();
$c->add(ActActEntityNrefPeer::ENT_ENTITY_ID, $beneficiaire_id);
$c->add(ActActEntityNrefPeer::ACT_TYPE_PARTICIPATION_ID, 4);
$c->addJoin(ActActEntityNrefPeer::ACT_ACT_ID,ActActPeer::ID,
Criteria::LEFT_JOIN);
$c->add(ActActPeer::START_DATETIME, date('Y-d-m
H:i',mktime(0,0,0,date("n"),date("j")-$ago,date("Y"))),
Criteria::GREATER_THAN);
$c->addSelectColumn(ActActEntityNrefPeer::ACT_ACT_ID);
$actes = ActActEntityNrefPeer::doSelectRS($c);
while($actes->next()){
$c2=new Criteria();
$c2->add(ActActEntityNrefPeer::ACT_ACT_ID,
$actes->getInt(1));
$c2->add(ActActEntityNrefPeer::ACT_TYPE_PARTICIPATION_ID, 5);
$c2->addOr(ActActEntityNrefPeer::ACT_TYPE_PARTICIPATION_ID, 6);
$c2->addOr(ActActEntityNrefPeer::ACT_TYPE_PARTICIPATION_ID, 7);
$c2->addSelectColumn(ActActEntityNrefPeer::ENT_ENTITY_ID);
$res = ActActEntityNrefPeer::doSelectRS($c2);
while($res->next()){
isset($liste[$res->getInt(1)]) ?
$liste[$res->getInt(1)]++ :
$liste[$res->getInt(1)]=1;
}
}
The first request result contains average 200 elements. That is why I
need to combine 2 requests in one.
Thanks , Julien.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---