RE: [PHP-DB] detecting negative numbers

2006-07-17 Thread Ford, Mike
On 17 July 2006 01:07, Dave W wrote: No, I get it. I just thought that there might have been some built in function like if(neg_num($quant - $amount)) or something like that. I know how to do it, but I thought that there might have been an alternate method. Just because I asked a simple

Re: [PHP-DB] detecting negative numbers

2006-07-17 Thread John Meyer
Dave W wrote: No, I get it. I just thought that there might have been some built in function like if(neg_num($quant - $amount)) or something like that. I know how to do it, but I thought that there might have been an alternate method. Just because I asked a simple question doesn't mean I'm

Re: [PHP-DB] detecting negative numbers

2006-07-16 Thread Peter Beckman
On Sun, 16 Jul 2006, Dave W wrote: Currently I have this: if($quant $amount) {echo You don't have that many!; } $quant is the user inputted amount and $amount is the amount that they actually have. Is there any way of checking if the result is negative rather than doing what I have above?

Re: [PHP-DB] detecting negative numbers

2006-07-16 Thread Dave W
They are both positive numbers. I want to see if, when subtract, do they equal a negative number? On 7/16/06, Peter Beckman [EMAIL PROTECTED] wrote: On Sun, 16 Jul 2006, Dave W wrote: Currently I have this: if($quant $amount) {echo You don't have that many!; } $quant is the user

Re: [PHP-DB] detecting negative numbers

2006-07-16 Thread Stut
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave W wrote: Currently I have this: if($quant $amount) {echo You don't have that many!; } $quant is the user inputted amount and $amount is the amount that they actually have. Is there any way of checking if the result is negative rather

Re: [PHP-DB] detecting negative numbers

2006-07-16 Thread Dave W
No, I get it. I just thought that there might have been some built in function like if(neg_num($quant - $amount)) or something like that. I know how to do it, but I thought that there might have been an alternate method. Just because I asked a simple question doesn't mean I'm stupid, I'm just