RE: [PHP] querying for values inside range

2003-03-18 Thread Jon Haworth
Hi Jason, > $sql = "select * from table where age>=$age1 and age<=$age2"; > what if i don't know which is value is greater, age1 or age2? PHP has a couple of handy functions for this: min() and max() $min = min($age1, $age2); // get smallest of two values $max = max($age1, $age2); // get large

Re: [PHP] querying for values inside range

2003-03-18 Thread Wico de Leeuw
At 06:04 18-3-03 -0500, Jason Paschal wrote: this is an sql syntax question and i know it's not appropriate for this mailing list, but i didn't want to subscribe to another mailing list for something i think one of you might be able help me with. thank you for your patience. i'm building a sit

Re: [PHP] querying for values inside range

2003-03-18 Thread Wico de Leeuw
At 06:04 18-3-03 -0500, Jason Paschal wrote: this is an sql syntax question and i know it's not appropriate for this mailing list, but i didn't want to subscribe to another mailing list for something i think one of you might be able help me with. thank you for your patience. i'm building a sit

[PHP] querying for values inside range

2003-03-18 Thread Jason Paschal
this is an sql syntax question and i know it's not appropriate for this mailing list, but i didn't want to subscribe to another mailing list for something i think one of you might be able help me with. thank you for your patience. i'm building a site utilizing PHP/MySQL. i'm querying a table