more mysql8 fixes
This commit is contained in:
parent
3bd0525e64
commit
ea89ebf150
|
@ -31,7 +31,7 @@ if ( $action == 'state' ) {
|
||||||
}
|
}
|
||||||
} else if ( $action == 'save' ) {
|
} else if ( $action == 'save' ) {
|
||||||
if ( !empty($_REQUEST['runState']) || !empty($_REQUEST['newState']) ) {
|
if ( !empty($_REQUEST['runState']) || !empty($_REQUEST['newState']) ) {
|
||||||
$sql = 'SELECT Id,Function,Enabled FROM Monitors ORDER BY Id';
|
$sql = 'SELECT `Id`,`Function`,`Enabled` FROM Monitors ORDER BY Id';
|
||||||
$definitions = array();
|
$definitions = array();
|
||||||
foreach ( dbFetchAll($sql) as $monitor ) {
|
foreach ( dbFetchAll($sql) as $monitor ) {
|
||||||
$definitions[] = $monitor['Id'].':'.$monitor['Function'].':'.$monitor['Enabled'];
|
$definitions[] = $monitor['Id'].':'.$monitor['Function'].':'.$monitor['Enabled'];
|
||||||
|
@ -39,11 +39,11 @@ if ( $action == 'state' ) {
|
||||||
$definition = join(',', $definitions);
|
$definition = join(',', $definitions);
|
||||||
if ( $_REQUEST['newState'] )
|
if ( $_REQUEST['newState'] )
|
||||||
$_REQUEST['runState'] = $_REQUEST['newState'];
|
$_REQUEST['runState'] = $_REQUEST['newState'];
|
||||||
dbQuery('REPLACE INTO States SET Name=?, Definition=?', array($_REQUEST['runState'],$definition));
|
dbQuery('REPLACE INTO `States` SET `Name`=?, `Definition`=?', array($_REQUEST['runState'],$definition));
|
||||||
}
|
}
|
||||||
} else if ( $action == 'delete' ) {
|
} else if ( $action == 'delete' ) {
|
||||||
if ( isset($_REQUEST['runState']) )
|
if ( isset($_REQUEST['runState']) )
|
||||||
dbQuery('DELETE FROM States WHERE Name=?', array($_REQUEST['runState']));
|
dbQuery('DELETE FROM `States` WHERE `Name`=?', array($_REQUEST['runState']));
|
||||||
}
|
}
|
||||||
$view = 'console';
|
$view = 'console';
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue