negative balance

Discussion in 'General PHP' started by cyclops4real007, Apr 4, 2017.

  1. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    i think it will b nice if a buyer gets an error alert that the user balance is not enough, like d codes in datacheck.inc any idea how to go about it, instead of getting a negative balance n asking user to pay up
     
  2. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    Should maybe talk about that in one of your threads concerning your balance problem like this.

    you don't need to insert balance into bids table you just need to JOIN users table and call balance where ever you want to use webid_users.balance

    This might help with that https://www.w3schools.com/sql/sql_join.asp
     
    cyclops4real007 likes this.
  3. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    ok then any idea on this

    i think it will b nice if a buyer gets an error alert that the user balance is not enough, like d codes in datacheck.inc any idea how to go about it, instead of getting a negative balance n asking user to pay up
     
  4. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    i don't know where to look to even start. you would probs JOIN the users table to bids table then run an IF statement on the bids code and if they have a balance then allow bid ELSE display a message from the message.inc.php or you could probs use the message board in some way .
    but i am very new to PHP and takes me alot of time figure stuff out.
     
  5. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    oh i see, welcome on board on d newbie part, am also learning my way tru
     
  6. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    you should have a look at codeacademy good hands on learning. it has helped me
     
  7. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    will check em out
     
  8. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    but still give it a try n see if u can do it
     
  9. aditya12

    aditya12 New Member

    Joined:
    Feb 7, 2019
    Messages:
    1
    Likes Received:
    0
    ould maybe talk about that in one of your threads concerning your balance problem like this.

    you don't need to insert balance into bids table you just need to JOIN users table and call balance where ever you want to use webid_users.balance

    This might help with that
    https://www.welookups.com/sql/sql_join.html
     

Share This Page