another final version

This commit is contained in:
lopar 2019-01-16 00:25:57 +02:00
parent e1b3603738
commit 84bc896313

View File

@ -30,6 +30,7 @@ function setProfession($name, $type, $needMoney, $needLevel)
if (!empty($profId)) {
db::c()->query('UPDATE `users` SET ?f = ?i, `money` = `money` - ?i WHERE `id` = ?i', 'prof' . $type, $profId, $needMoney, $_SESSION['uid']);
$user['prof'.$type] = true;
$user['money'] -= $needMoney;
return 'Вы получили профессию!';
} else return 'Что-то пошло не так...';
}