error in money check
This commit is contained in:
parent
fe619c675a
commit
94c221dfbc
2
shop.php
2
shop.php
@ -122,7 +122,7 @@ if ($sellItemId) {
|
||||
|
||||
$allcost = mt_rand(0,$dress['cost']/2);
|
||||
db::c()->query('DELETE FROM `inventory` WHERE `id` = ?i', $dress['id']);
|
||||
db::c()->query('UPDATE `users` SET `money` = ?i WHERE `id` = ?i', $allcost, $_SESSION['uid']);
|
||||
db::c()->query('UPDATE `users` SET `money` = `money` - ?i WHERE `id` = ?i', $allcost, $_SESSION['uid']);
|
||||
$status = "Вы продали «{$dress['name']}» $kols за " . $allcost . " кр.";
|
||||
$deloText = "{$user['login']} продал товар «{$dress['name']}»{$kols}id:({$dress['id']}) в магазине за {$allcost} кр.";
|
||||
addToDelo($deloText);
|
||||
|
Loading…
Reference in New Issue
Block a user