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

2004-11-05 Thread Murray @ PlanetThoughtful
[snippage] > In theory perhaps, the "better" approach kind of depends on if he is > looking > up the cost of one shipment or many. Databases, like you indicated, are > optimized for looking up this kind of information from large record sets > on > a hard drive and a good database will try to cach

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

2004-11-05 Thread Warren Vail
> > You can probably figure ways to streamline this, but I think it > may answer > > your basic question. The best solution is one that works for you > > reliably, > > and there have to be at least 50 ways to do this. This is just one. > > Hmm. Personally I would have thought the best way to do

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

2004-11-05 Thread Murray @ PlanetThoughtful
> You can probably figure ways to streamline this, but I think it may answer > your basic question. The best solution is one that works for you > reliably, > and there have to be at least 50 ways to do this. This is just one. Hmm. Personally I would have thought the best way to do this is to get

Re: [PHP] getting a number range from user input.. (weight)

2004-11-05 Thread Louie Miranda
gt; largest > weight > > You can probably figure ways to streamline this, but I think it may answer > your basic question. The best solution is one that works for you reliably, > and there have to be at least 50 ways to do this. This is just one. > > good luck, > >

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

2004-11-05 Thread Warren Vail
AIL PROTECTED] Subject: Re: [PHP] getting a number range from user input.. (weight) I have this on my db. mysql> select * from rates_dhl where weight_kg = "6" between range and Weight_KG; ++---+---++++++- ---++--

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

2004-11-04 Thread Murray @ PlanetThoughtful
EMAIL PROTECTED] > Sent: Friday, 5 November 2004 4:06 PM > To: Murray @ PlanetThoughtful; [EMAIL PROTECTED] > Subject: Re: [PHP] getting a number range from user input.. (weight) > > I have this on my db. > >

Re: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
I have this on my db. mysql> select * from rates_dhl where weight_kg = "6" between range and Weight_KG; ++---+---+++++++++ | id | range | Weight_KG | Zone_A | Zone_B | Zone_C | Zone_D | Zone_E | Zone_F | Zone_G | Zone_

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

2004-11-04 Thread Murray @ PlanetThoughtful
> OK, here is what it should do. > > I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for > each weight it has a succeeding value, i cannot jump or just round off > the numbers. So i need a range detector to do it. > > Because for each of the item below: > > > weight value >

Re: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
Im thingking of putting the fixed value into an array and compare thru < and > and get the fixed rate. On Fri, 05 Nov 2004 14:38:17 +1100, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > Well, I dont know if there is a function that can do this in PHP, but > you could always split the number using

Re: [PHP] getting a number range from user input.. (weight)

2004-11-04 Thread Louie Miranda
OK, here is what it should do. I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for each weight it has a succeeding value, i cannot jump or just round off the numbers. So i need a range detector to do it. Because for each of the item below: > weight value > .59.45

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

2004-11-04 Thread Vail, Warren
Are you trying to round to the nearest .5 value? Warren Vail -Original Message- From: Vail, Warren Sent: Thursday, November 04, 2004 7:24 PM To: 'Louie Miranda'; [EMAIL PROTECTED] Subject: RE: [PHP] getting a number range from user input.. (weight) Not sure I completely

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

2004-11-04 Thread Vail, Warren
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 Messag