Fixed search query typo

This commit is contained in:
Karl Cordes 2010-05-11 15:18:44 +10:00
parent 0d1601a0c8
commit 0790043afe

View file

@ -451,11 +451,11 @@ class EnquiriesController extends AppController {
if(count($words) == 2) {
$contactConditions = array('AND'=>array('Contact.first_name LIKE' => "%$words[0]%",
'Contact.last_name LIKE' => "%$words[1]"));
'Contact.last_name LIKE' => "%$words[1]%"));
}
else {
$contactConditions = array('OR'=>array('Contact.first_name LIKE' => "%$searchQuery%",
'Contact.last_name LIKE' => "%$searchQuery"));
'Contact.last_name LIKE' => "%$searchQuery%"));
}
$customerResults = $this->Enquiry->Customer->find('all', array('conditions' => $custConditions, 'recursive'=>0));