943,779 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 2782
  • ASP RSS
May 17th, 2004
0

problems selecting minimum when searching

Expand Post »
I am trying to select the number of rooms from my database but want it so the user can select a minimum or exact number.

This is a snippet of the code on my search page
<tr><td>Number Of Bedrooms:
<td>
<SELECT NAME="REQUIREMENT">
<OPTION VALUE="AL">Minimum</OPTION>
<OPTION VALUE="EX">Exactly</OPTION>
</SELECT>

<select name="Bedrooms" size="1">
<option selected value="">-</option>
<option value="2">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>

</select></td></tr>

This is a snippet of the code on my results page

IF Bedrooms <> "" THEN
SELECT CASE Requirement
CASE "AL" Bedrooms = Bedrooms + "and BEDROOMS >=" & BEDROOMS
CASE "EX" Bedrooms = Bedrooms + "and BEDROOMS =" & BEDROOMS
END SELECT
END IF

If Bedrooms <> "" Then
WhereClause = WhereClause & "Bedrooms = " & _
Bedrooms & " AND "
End If


Please help If you need more information please just ask i'm really strugling with this one.

Cheers
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
squirrelj is offline Offline
4 posts
since May 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Creating ASP with ASP
Next Thread in ASP Forum Timeline: "ADODB Recordset error"





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC