We implemented a hack to get around this.
One limitation is that it does not allow wildcarding the end of the first name. For example, if you were searching for "John Smith", it would find it under "John Sm" and "%ohn Smi" but not "Jo Sm"
Edit modules/Contacts/Contact.php and look for the search code:
Code:
array_push($where_clauses, "contacts.last_name like '$the_query_string%'");
array_push($where_clauses, "contacts.first_name like '$the_query_string%'");
array_push($where_clauses, "accounts.name like '$the_query_string%'");
array_push($where_clauses, "contacts.assistant like '$the_query_string%'");
array_push($where_clauses, "contacts.email1 like '$the_query_string%'");
array_push($where_clauses, "contacts.email2 like '$the_query_string%'"); And change it to add an additional line:
Code:
array_push($where_clauses, "contacts.last_name like '$the_query_string%'");
array_push($where_clauses, "contacts.first_name like '$the_query_string%'");
array_push($where_clauses, "accounts.name like '$the_query_string%'");
array_push($where_clauses, "contacts.assistant like '$the_query_string%'");
array_push($where_clauses, "contacts.email1 like '$the_query_string%'");
array_push($where_clauses, "contacts.email2 like '$the_query_string%'");
array_push($where_clauses, "CONCAT(contacts.first_name,' ',contacts.last_name) like '$the_query_string%'"); It will make the search a little longer but will achieve what you want.
Bookmarks