Gossamer Forum
Home : Products : DBMan SQL : Discussion :

My Star Rating

Quote Reply
My Star Rating
I have a search for sar rating for hotels in my database. There is a maximum and minium star rating drop down menus. I want the user to select one drop down for max and another for min. So the user can go say 4 star max to 2 star max. I have used the -gt and -lt function. But it seems if I use this then if one selects say 4 star max to 2 star min then the result will include 3.5, 3, 2.5. It will not include 4 and 2. Is there a way I can fix this?

<select name="MaxClass-gt">
<option value="" selected>Min Star Rating</option>
<option value="1">1 Star</option>
<option value="1.5">1 and a half Star</option>
<option value="2">2 Star</option>
<option value="2.5">2 and a half Star</option>
<option value="3">3 Star</option>
<option value="3.5">3 and a half Star</option>
<option value="4">4 Star</option>
<option value="4.5">4 and a half Star</option>
<option value="5">5 Star</option>
<option value="6">International Class</option>
</select>

<select name="MaxClass-lt">
<option value="" selected>Max Star Rating</option>
<option value="6">International Class</option>
<option value="5">5 Star</option>
<option value="4.5">4 and a half Star</option>
<option value="4">4 Star</option>
<option value="3.5">3 and a half Star</option>
<option value="3">3 Star</option>
<option value="2.5">2 and a half Star</option>
<option value="2">2 Star</option>
<option value="1.5">1 and a half Star</option>
<option value="1">1 Star</option>
</select>
Quote Reply
Re: [needsupport] My Star Rating In reply to
We've just added this function into our library. Please find attached the new GT/SQL/Base.pm for a quick update. From now you can use fieldname-le (less than or equal) , fieldname-ge (greater than or equal) in your range searches.

Cheers,

jean

Gossamer Threads

Last edited by:

jean: Mar 12, 2002, 2:59 PM