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
r > >>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: Loui

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

2004-11-04 Thread Louie Miranda
t; Sent: Thursday, November 04, 2004 7:09 PM > To: [EMAIL PROTECTED] > Subject: [PHP] 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 w

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

2004-11-04 Thread Louie Miranda
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 .59.45 1.0 10.71 1.5 11.97 2.0 13.23

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
Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 7:09 PM To: [EMAIL PROTECTED] Subject: [PHP] 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