The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Help with changing price after deduction...
chrisj
post Dec 7 2022, 12:09 PM
Post #1





Group: Members
Posts: 9
Joined: 6-May 21
Member No.: 27,927



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th January 2023 - 05:57 PM