Hi, First of all the 'TagRelationships' should be 'items_tags' if Item hasMany Tag. In the 3rd point, what do you mean by 'these tags'? Are you talking about 'zinger' in 'KFC Malleswaram zinger' search term?
Amit http://amitrb.wordpress.com/ http://coppermine-gallery.net/ http://cheesecake-photoblog.org/ http://www.sanisoft.com/blog/author/amitbadkas http://wordpress.org/extend/plugins/profile/amitbadkas On Sun, Nov 7, 2010 at 1:31 PM, hmv <[email protected]> wrote: > I am trying to implement the Search Plugin from CakeDc. > > - I want to do a generic Seach from the header > > I have Few models like these > > restaurants(id, name, address, avg_cost, landmark, area_id,...) > > modules(id, name) > > Items (id, module_id, item_id) > > Dishes(id, name, title, restaurant_id) > > Areas(id, name) > > Tags(id, name) > > TagRelationships(id, item_id, tag_id) > > > Example: > > When some one seaches for KFC Malleswaram zinger > it should provide results in this format > > 1. Find the Restaurant whose name is KFC and has area Malleswaram > 2. Find the Item Ids of these restaurants like this from the Items > table (id, module_id = 2, item_id = restaurant_id) > 3. then find the tags from the tags table and see if any item ids have > these tags. and attach it. > > > can this be done > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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]<cake-php%[email protected]>For > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
