Search through dropdownlist

Hey all,

I have a dropdownlist to display numbers to be used in a search. I have no problem using it with less/greater than but that’s about it. I want to be able to use it to find values between two numbers also.

Here is my failed attempt. Can someone set me straight please?

<?php echo $form->dropDownList($model, 'Amount', 


    '<=500' => 'Less than $500', // working

    '>=500 && <=1000' => '$500 - $1000',   // not working returns anything over 500

    '500 <= x <=1000' => '$500 - $1000',   // <img src='' class='bbc_emoticon' alt='???' />

    '>=500' => 'Greater than $500',  // working


  array( 'prompt'=>''));



could you please explain what are doing with submitted values on server side?


Hi drylko,

I would be happy to explain more but not sure exactly what info you are looking for. I am trying to search through the values in a gridview. Like I said the greater/less than is working fine but ranges are not.