Hi to all,
I've used many times the 'join' key in a Model::find('all') statement, as
follows:
$peee = $this->Video->find('all',
array(
'joins' => array(
'LEFT JOIN artists Artist on (Video.artist_id = Artist.id)',
'LEFT JOIN album_videos AlbumVideo ON (AlbumVideo.video_id =
Video.id)',
'LEFT JOIN albums Album ON (Album.id =
AlbumVideo.album_id)'),
,
'conditions' => implode(' AND ', $Conditions)
)
);
And it works.
I use this because I need to be able to search using a field in the Albums
table which is not included in SQL generated by CakePHP.
Once I found this works exactly as I need, I wanted to use the JOIN key in
pagination, but it didn't the trick.
Have anybody used the JOIN key in Pagination, or have any suggestion?
I'm working in CakePHP 1.2 RC3.
Thanks to all!
n.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---