Escape column names for mysql 8. Fixes #3092
This commit is contained in:
parent
fdbca4760f
commit
ea6478b8a0
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue