Except that your original post suggested that you wanted to use the
"User.id" as a condition in your WHERE clause, for a join between
Users and Documents. Which is simply not possible when you have two
databases with different permissions, regardless of the framework (or
lack thereof) - it just isn't possible in SQL.
When you have to have different connections to the database, then you
will need to use multiple queries - so the only way to do it is
$users = $this->User->findAll( $user_conditions, array('User.id') );
$user_ids = Set::extract($users, '{n}.User.id');
$documents = $this->Document->findAll( array('Document.user_id'=>
$user_ids) );
which really isn't that complex.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---