Hi all,
I have a problem with hasAndBelongsToMany (HABTM) and pagination...
Site Model:
$hasAndBelongsToMany = array('Tag' => array('className'=> 'Tag'));
$belongsTo = array('Category','Webagency');
Tag Model:
$hasAndBelongsToMany = array('Site' => array('className'=> 'Site'));
The 'sites' table is:
`id`
`category_id`
`webagency_id`
`title`
`description`
`vote`
`img`
`parent_id`
`created`
`modified`
The 'tags' table is:
`id`
`tag`
`created`
`modified`
The table relation is 'sites_tags':
`id`
`site_id`
`tag_id`
`created`
`modified`
I want to use pagination with this conditions (for example):
Site.category_id = '1' AND Tag.id = '1' OR Tag.id = '2'
It's possible?
Sorry for my english, thanks.
Gianluca
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---