Ok I know it isn't done the wright way, but it should work! The
pagination only gives 1 result (cake 1.1) while the var_dump gives the
following string string(22) "535,587,1211,1964,2791" thx in advance
for the help
function filter() {
$userid = $this->User->query("SELECT DISTINCT User.id FROM
users as User
LEFT JOIN userjobids as uj ON User.id = uj.user_id
LEFT JOIN jobids as job ON job.id = uj.jobid_id
WHERE job.id = '$_GET[functie]' GROUP BY User.id");
foreach ($userid as $arr_user) {
$ids[] = $arr_user['User']['id'];
}
$userid = implode(',',$ids);
$criteria = array('id' => $userid);
list($order,$limit,$page) = $this->Pagination-
>init($criteria); // Added
$data = $this->User->findAll($criteria, NULL,
$order, $limit,
$page); // Extra parameters added
$this->set('data',$data);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---