On Thu, 16 Sep 2004 16:47, you wrote: > Thank you for response > and what if user choose for 300.000 than the query should bee > SELECT fields FROM table WHERE something BETWEEN 250.000 AND 300.000 > But I don'n know what the user will choose do I need to make a if statement > If($prijsklasse=='2'){ > $option ="WHERE something BETWEEN 250.000 AND 300.000"; > }elseif($prijsklasse=='3'){ > $option ="WHERE something BETWEEN 300.000 AND 350.000"; > }else.... > SELECT fields FROM table .$option; > Is this a good aproach > Thank you in advance > > > "David Robley" <[EMAIL PROTECTED]> wrote in message > news:<[EMAIL PROTECTED]>... > > > On Wed, 15 Sep 2004 23:30, Peppe wrote: > > > Hi > > > I have a option box with values > > > <select name="prijsklasse" class="bodyzwart" id="prijsklasse"> > > > <option value="1" selected>Less than 150.000 > > > <option value="2">tot 175.000 > > > <option value="3">tot 200.000 > > > <option value="4">tot 250.000 > > > <option value="5">tot 300.000 > > > <option value="6">tot 350.000 > > > <option value="7">tot 400.000 > > > <option value="8">More than 400.000 > > > </select> > > > I need help when the user chose option value 3 till 200.000 than the > > query > > > > should search between 175.000 and 200.000 how to achive this > > > Regards > > > > SELECT fields FROM table WHERE something BETWEEN 175.000 AND 200.000 > > > > More information at > > http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html or see the > > docs > > > for whatever other database you use.
It is better to keep your correspondence to the list, so tht you are likely to receive responses from all the list subscribers. Yor best solution would be to use a switch and build your query based on the value of prijsklasse. -- David Robley Famous last words - Icarus: Aaaahhhhhhhhh. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php