Re: [PHP-DB] Still bangin my head

2002-02-25 Thread Marius Ursache
if you follow your code you see that you do 0 - 1000 and it's logic to be -1000. Jennifer Downey a écrit : Hi all, I'm still banging my head on this. Let's say I have $1000 to withdraw from my account. I withdraw that $1000 which leaves me $0 dollars in the account. With the code below

RE: [PHP-DB] Still bangin my head

2002-02-25 Thread Beau Lebens
you would need to do a select and find out how much is in the account first, then do a check on the equation to see if the result is going to come out negative - if it is, then either don't allow it, or give them an option to clear the account or whatever, otherwise just go ahead and do the