Posted by: chrisj Dec 7 2022, 12:09 PM
Thanks for all the previous help.
This works successfully:
CODE
$wallet = $user->wallet;
$upwallet = ($sell_video == 0 && $wallet >= 1 ? .5 : 0);
$db->rawQuery("UPDATE ".T_USERS." SET `wallet` = `wallet`- '".$upwallet."' WHERE `id` = '".$video->user_id."'");
(when the sell_video amount is 0 and the wallet amount >= 1, deduct .5 from the wallet). Works successfully.
I'd like guidance to add:
When the sell_video amount is 0 and the wallet amount = .5, change/update the sell_video to X.
Any assistance is welcomed.