You can use CONCAT function in conditions array like this. $query = $this->data['Customer']['query_field']; //Or wherever you want $conditions = array(CONCAT(Customer.first_name,' ',Customer.last_name) like '%"$query"%');
You can use $conditiones to filter the search in paginate or other method like findAll. Try this and tell me if work. Good Luck Axel On 2/11/08, Tuncinss <[EMAIL PROTECTED]> wrote: > > Hello Everybody, > > I am new to cakePHP and I have a little problem. I have 'first name' > and 'last name' fields in my customer database but while searching, > I'd like to type customer's name in one field. In other words for > example, when I enter "john brown" in the search field, i want to see > his profile although his full name was entered in two seperate fields. > I wish I could explain my problem clear enough. > > > > -- Axel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
