> Maybe try this:
>
> $articles = $this->paginate('Article', array(
> 'conditions'=>array(
>      'OR'=>array(
>           'Article.name LIKE ' => '%' .$q .'%',
>           'Tag.name LIKE ' => '%' .$q .'%'
>           )
>      )
> ));

Thanks but unfortunately doesn't work.

$hasMany(s) [ie: Comments] and $hasAndBelongsToMany(s) are not even
included in the generated SQL query [ie: Tags] :(

SELECT COUNT(*) AS `count` FROM `app_articles` AS `Article` LEFT JOIN
`app_users` AS `User` ON (`Article`.`user_id` = `User`.`id`)
WHERE `User`.`active` = 1 AND `Photo`.`name` LIKE '%flower%'

I suppose it's a bit harder than I expected.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to