Hello everybody, after baking and modifying the default MVC for my app, now I'd like to insert a simple search form for one of my models.
The model is linked by a belongsTo relationship to three other tables, and contains a Date field. I'd like to find items specifying one or more of the other tables' id ('other_table_id = value') and that are in a given date range. I chose this approach, that doesn't seem to work well: I created a simple search method in the controller, that fills the right lists for the three other tables, and a search view that contains the three selects and two date fields. The form action is the index() method, that I modified to check if this->data is set. If it is set, I use the findAll() method with this->postConditions($this->data) as a parameter, but it doesn't find anything. >From the three available selects, I chose only one element. What might I have done wrong? Moreover, this approach doesn't work if I have to input a start date and an end date for my date field, because the model will think that they are fields of the table. Can anyone suggest me a pattern for this kind of problem? I'm using Cake 1.1 Thanks in advance, and sorry for the long post and the poor english. :) Bye, -- [ Andrea Spadaccini - a.k.a. lupino3 - GLUGCT - from Catania - ICQ : 91528290 ] [ GPG ID: 5D41ABF0 - key on keyservers - Debian GNU / Linux - Kernel 2.6.18.4 ] [ Linux Registered User 313388 - a(dot)spadaccini(at)catania(dot)linux(dot)it ] [ The only price you pay for greatness is knowing that it can't last forever. ] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---