DELETE FROM `devicemsgque` WHERE GroupID>0;
DELETE FROM `msgcommlist` WHERE GroupID>0;
UPDATE `userdevices` SET ActiveMsgID=0 Where DeviceGroupID>0;
UPDATE `activemsg` SET Selected=0, Done=0, Enabled=1, Ready=0, Wait=0, Locked=0, Triggered=0, NumtimesDisplayed=0, SelectedDeviceID=0, ActMsgDeleted=0, ResponseID=0, ErrorID=0, LastTimeMsgDisplayed='1993-07-08 00:00:00', ActiveStartDateTime='1993-07-08 00:00:00', ActiveEndDateTime='1993-07-08 00:00:00', LastResetDateTime='1993-07-08 00:00:00', ActMsgDeletedDateTime='1993-07-08 00:00:00', ResponseMethod=' ', UserPresence=0  WHERE GroupID>0;
UPDATE `userdevices` SET MsgTableID=0 Where DeviceGroupID>0;
UPDATE `userdevices` SET UserPresence=0 Where DeviceGroupID>0;
UPDATE `userdevices` SET DeviceState="" Where DeviceGroupID>0;
UPDATE `userdevices` SET CommStatus="" Where DeviceGroupID>0;
UPDATE `userdevices` SET DisplayFormatID=0 Where DeviceGroupID>0;
UPDATE `groupinfo` SET `LockDeviceID`=0,`LockDeviceTime`=0 WHERE GroupID>0;
DELETE FROM `history` WHERE HistoryIndexID>0;
DELETE FROM `stylestatus` WHERE StyleID>0;
DELETE FROM `stylelist` WHERE StyleID>0;
DELETE FROM `activesessions` WHERE GroupID>0;