I have a small web application in ASP talking to a MySQL database. This application has been developed using Macromedia Dreamweaver MX 2004.
I am trying to write a search/results page which gives mulitiple options in the search and need some help please
I would like to search on location, allocation and date range, I am part way through writing the results page currently searching on location and allocation which does work however...
On the search page where the users will be able to click on drop down I have put the first option for each as ALL so if they only want to search on allocation in theory the location will bring back all the results allocated to x in all locations. For both location and allocation i have put "ALL" as the option value. How do I incorporate this into the code?
any help would be greatly apprecited.
jobs__MMColParam = "1"
If (Request.Form("location1") <> "") Then
jobs__MMColParam = Request.Form("location1")
jobs__MMColParam1 = "1"
If (Request.Form("allocation1") <> "") Then
jobs__MMColParam1 = Request.Form("allocation1")
Set jobs = Server.CreateObject("ADODB.Recordset")
jobs.ActiveConnection = MM_sgmaintenance_STRING
jobs.Source = "SELECT * FROM jobs WHERE location = '" + Replace(jobs__MMColParam, "'", "''") + "' and joballocation ='" + Replace(jobs__MMColParam1, "'", "''") + "' and status <> 'complete' and status <> 'rejected' ORDER BY Id DESC"
jobs.CursorType = 0
jobs.CursorLocation = 2
jobs.LockType = 1
jobs_numRows = 0