Fixed search query typo
This commit is contained in:
parent
0d1601a0c8
commit
0790043afe
|
|
@ -451,11 +451,11 @@ class EnquiriesController extends AppController {
|
||||||
|
|
||||||
if(count($words) == 2) {
|
if(count($words) == 2) {
|
||||||
$contactConditions = array('AND'=>array('Contact.first_name LIKE' => "%$words[0]%",
|
$contactConditions = array('AND'=>array('Contact.first_name LIKE' => "%$words[0]%",
|
||||||
'Contact.last_name LIKE' => "%$words[1]"));
|
'Contact.last_name LIKE' => "%$words[1]%"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$contactConditions = array('OR'=>array('Contact.first_name LIKE' => "%$searchQuery%",
|
$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));
|
$customerResults = $this->Enquiry->Customer->find('all', array('conditions' => $custConditions, 'recursive'=>0));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue