Skip to content

Commit 63940cc

Browse files
committed
Set the table name explicitly for the where clause
1 parent a30f5f9 commit 63940cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

list-ajax.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
$aColumns = array( 'checksum', 'count', 'time', 'time_avg', 'first_seen', 'last_seen', 'fingerprint', 'reviewed_on', 'reviewed_by', 'comments' );
66
// Controls if we use a HAVING clause vs a WHERE clause
7-
$having = array( true, true, true, true, false, false, false, false, false, false );
7+
$having = array( false, true, true, true, false, false, false, false, false, false );
88

99
$query = 'SELECT SQL_CALC_FOUND_ROWS ';
1010
$query .= ' review.checksum AS checksum,';
@@ -54,6 +54,8 @@
5454
else
5555
$sWhere .= Database::escapeField($aColumns[$i])." = '".($_GET['sSearch_'.$i])."' ";
5656
}
57+
elseif ($aColumns[$i] == 'checksum')
58+
$sWhere .= "`review`.`".$aColumns[$i]."` LIKE '%".($_GET['sSearch_'.$i])."%' ";
5759
else
5860
$sWhere .= "`".$aColumns[$i]."` LIKE '%".($_GET['sSearch_'.$i])."%' ";
5961
}

0 commit comments

Comments
 (0)