Catch db lock error.

This commit is contained in:
Igor Barkov (iwork) 2020-09-28 19:03:01 +03:00
parent 7fef811dbf
commit 735ad73d8b

View File

@ -10,8 +10,12 @@ if ($user->battle != 0) {
header('Location: fbattle.php');
exit;
}
try {
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE, `clans` WRITE');
} catch (Exception $e) {
echo $e->getMessage();
}
$do = $_GET['do'] ?? null;
if ($do == "clear" && $user->admin == 1) {
db::c()->query('UPDATE `zayavka` SET `coment` = "?s" WHERE `id` = ?i', '<em>Вырезано цензурой!</em>', $_GET['zid']);