RE: getting a number range from user input.. (weight)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not sure I completely understand what you are trying to do.  In your
problem, seems to me that both 1.3 and 1.6 would fall under 2.0 and neither
of them would fall under 1.0.  You must be using some logic that I am not
getting.  Can you be a little more specific?

Warren Vail


-----Original Message-----
From: Louie Miranda [mailto:lmiranda@xxxxxxxxx] 
Sent: Thursday, November 04, 2004 7:09 PM
To: php-general@xxxxxxxxxxxxx
Subject:  getting a number range from user input.. (weight)


How can i match a range of numbers from a given input?
i tried round() but it rounds off the numbers to the next number, so that
will be wrong.

My example below show 4 examples of what my db tables looks like.

weight   value
.5            9.45
1.0         10.71
1.5         11.97
2.0         13.23

How can i get the range of:

.1 to fall under .5 and
1.3 to fall under 1.0 and
1.6 to fall under 2.0

and so on.. any ideas?

-- 
Louie Miranda
http://www.axishift.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux