Remove unused
This commit is contained in:
+7
-1
@@ -10,6 +10,10 @@ if ($user['battle'] > 0) {
|
||||
header('Location: /fbattle.php');
|
||||
die();
|
||||
}
|
||||
use Krugozor\Database\Mysql\Mysql as Mysql;
|
||||
$db = Mysql::create("192.168.20.100", "battles", "bottle-neck-horse")
|
||||
->setDatabaseName("battles")
|
||||
->setCharset("utf8");
|
||||
|
||||
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
|
||||
$oldpsw = filter_input(INPUT_POST, 'oldpsw', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||
@@ -33,7 +37,9 @@ if ($name || $color || $hobbie) {
|
||||
if ($simbolcount > 1500) {
|
||||
err('Максимальная длинна поля Хобби: 1500 символов!');
|
||||
} else {
|
||||
db::c()->query('UPDATE `users` SET `realname` = "?s", `color` = "?s", `info` = "?s" WHERE `id` = ?i', $name, $color, $hobbie, $user['id']);
|
||||
//db::c()->query('UPDATE `users` SET `realname` = "?s", `color` = "?s", `info` = "?s" WHERE `id` = ?i', $name, $color, $hobbie, $user['id']);
|
||||
$values = ['realname'=>$name, 'color'=>$color, 'info'=>$hobbie];
|
||||
$db->query('UPDATE users SET ?As WHERE id = ?i', $values, $user['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user