"; if (isset($tbtl['id'])) { sleep(2); } else { mysql_query('UPDATE `users` SET `battle` = 0 WHERE `battle` > 0'); mysql_query( 'LOCK TABLES `battle_act` WRITE,`battle_end` WRITE,`battle_last` WRITE,`battle_out` WRITE,`battle_stat` WRITE,`battle_users` WRITE,`battle` WRITE,`battle_logs` WRITE,`battle_logs_save` WRITE,`zayvki` WRITE' ); mysql_query('TRUNCATE TABLE `battle_act`'); mysql_query('TRUNCATE TABLE `battle_end`'); mysql_query('TRUNCATE TABLE `battle_last`'); mysql_query('TRUNCATE TABLE `battle_out`'); mysql_query('TRUNCATE TABLE `battle_stat`'); mysql_query('TRUNCATE TABLE `battle_users`'); mysql_query('TRUNCATE TABLE `battle`'); mysql_query('TRUNCATE TABLE `battle_logs`'); mysql_query('TRUNCATE TABLE `battle_logs_save`'); mysql_query('TRUNCATE TABLE `zayvki`'); mysql_query('UNLOCK TABLES'); $test = 1; } }