Updated sql statements

This commit is contained in:
laf 2015-04-08 11:10:06 +01:00
parent 7a302c2763
commit cb2b782824

View File

@ -20,4 +20,6 @@ if ($_POST['state'] == 'true') {
$state = 0;
}
dbUpdate(array('value' => $state), 'callback', '`name` = "enabled"', array());
if( dbUpdate(array('value' => $state), 'callback', '`name` = "enabled"', array()) == 0) {
dbInsert(array('value' => $state,'name' => 'enabled'), 'callback');
}