Skip to content
Snippets Groups Projects
Commit 91d65d97 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix incorrect SQL query in staff directory

parent d4fed2cd
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ if($_REQUEST['q']) {
if($searchTerm){
$query=db_real_escape($searchTerm,false); //escape the term ONLY...no quotes.
if(is_numeric($searchTerm)){
$where.=" AND (staff.phone LIKE '%$query%' OR staff.phone_ext LIKE '%$query%' staff.mobile LIKE '%$query%') ";
$where.=" AND (staff.phone LIKE '%$query%' OR staff.phone_ext LIKE '%$query%' OR staff.mobile LIKE '%$query%') ";
}elseif(strpos($searchTerm,'@') && Validator::is_email($searchTerm)){
$where.=" AND staff.email='$query'";
}else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment