Catch db lock error.
This commit is contained in:
parent
7fef811dbf
commit
735ad73d8b
@ -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();
|
||||
}
|
||||
|
||||
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE, `clans` WRITE');
|
||||
$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']);
|
||||
|
Loading…
Reference in New Issue
Block a user