I am trying to create a search function for my site in which tags
(HABTM) is searched for. I am using something like the following but
am having no success w/ the Tags.name part. I get a unknown column
error. Any suggestions? Thank you as always for the help.

if(!empty($filters['search'])) {

                        $criteriaOR[] = "Skatepark.description LIKE '%" .
$filters['search'] . "%'";
                        $criteriaOR[] = "Skatepark.name LIKE '%" . 
$filters['search'] .
"%'";
                        $criteriaOR[] = "Tag.name LIKE '%" . $filters['search'] 
. "%'";
                        $criteriaOR[] = "State.name LIKE '%" . 
$filters['search'] . "%'";
                        $criteriaOR[] = "Skatepark.city LIKE '%" . 
$filters['search'] .
"%'";



                }

                $criteria = implode(" OR ",$criteriaOR);

                $this->Paginate("Skatepark",$criteria);



--~--~---------~--~----~------------~-------~--~----~
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