Escape column names for mysql 8. Fixes #3092

This commit is contained in:
Isaac Connor 2020-12-05 16:38:53 -05:00
parent fdbca4760f
commit ea6478b8a0
1 changed files with 5 additions and 5 deletions

View File

@ -80,10 +80,10 @@ if ( $groupSql )
foreach ( array('ServerId','StorageId','Status','Function') as $filter ) {
if ( isset($_SESSION[$filter]) ) {
if ( is_array($_SESSION[$filter]) ) {
$conditions[] = $filter . ' IN ('.implode(',', array_map(function(){return '?';}, $_SESSION[$filter])). ')';
$conditions[] = '`'.$filter . '` IN ('.implode(',', array_map(function(){return '?';}, $_SESSION[$filter])). ')';
$values = array_merge($values, $_SESSION[$filter]);
} else {
$conditions[] = $filter . '=?';
$conditions[] = '`'.$filter . '`=?';
$values[] = $_SESSION[$filter];
}
}