Update new Capturing, Analysing, Recording based on Function.
This commit is contained in:
parent
1f9d3c46aa
commit
71c7b324e9
|
@ -10,6 +10,8 @@ SET @s = (SELECT IF(
|
|||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
UPDATE `Monitors` SET `Capturing` = 'None' WHERE `Function` == 'None';
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
|
||||
AND table_name = 'Monitors'
|
||||
|
@ -22,6 +24,8 @@ SET @s = (SELECT IF(
|
|||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
UPDATE `Monitors` SET `Analysing` = 'None' WHERE `Function` == 'Record' OR `Function` == 'Nodect';
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
|
||||
AND table_name = 'Monitors'
|
||||
|
@ -46,6 +50,9 @@ SET @s = (SELECT IF(
|
|||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
UPDATE `Monitors` SET `Recording` = 'None' WHERE `Function` == 'Monitor';
|
||||
UPDATE `Monitors` SET `Recording` = 'OnMotion' WHERE `Function` == 'Modect';
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
|
||||
AND table_name = 'Monitors'
|
||||
|
|
Loading…
Reference in New Issue