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];
|
||||
}
|
||||
}
|
||||
|
@ -249,9 +249,9 @@ $html .= '</span>
|
|||
'multiple'=>'multiple',
|
||||
'data-placeholder'=>'All',
|
||||
) );
|
||||
# Repurpose this variable to be the list of MonitorIds as a result of all the filtering
|
||||
$selected_monitor_ids = array_map(function($monitor_row){return $monitor_row['Id'];}, $displayMonitors);
|
||||
$html .= '</span>
|
||||
# Repurpose this variable to be the list of MonitorIds as a result of all the filtering
|
||||
$selected_monitor_ids = array_map(function($monitor_row){return $monitor_row['Id'];}, $displayMonitors);
|
||||
$html .= '</span>
|
||||
';
|
||||
echo $html;
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue