I currently have a database table containing "jobs":
Tbl_Jobs(JobID, SpecNo, JobTitle, Description, Salary, JobType, JobType2, JobType3, JobType4, Location, Location2, Location3, Location4)
I have a page (searchjob.asp) where users can search for jobs using two combo boxes - they search by location and job type.
The page searchjobresult.asp page then gets the results of their search with the following code:
JS.Source = "SELECT SpecNo, Salary, JobType, Name, JobTitle, JobID FROM Tbl_Location a, Tbl_Jobs b WHERE JobType = " + Replace(JS__MMColParam, "'", "''"
+ " AND location = " + Replace(JS__MMColParam1, "'", "''"
+ " AND Location = LocationID ORDER BY SpecNo DESC"
(With the the two variables being....MMColParam = Request("jobtype"
and MMColParam1 = Request("location"
As you can see, this only looks at values in the JobTpye and Location fields from the Tbl_Jobs table. I want the search to return results if the users choice is also in the fields JobType2, 3 or 4 or Location2, 3, or 4.
What would be the SQL statement to do this?
I hope this makes sense! Many thanks in advance!
Tbl_Jobs(JobID, SpecNo, JobTitle, Description, Salary, JobType, JobType2, JobType3, JobType4, Location, Location2, Location3, Location4)
I have a page (searchjob.asp) where users can search for jobs using two combo boxes - they search by location and job type.
The page searchjobresult.asp page then gets the results of their search with the following code:
JS.Source = "SELECT SpecNo, Salary, JobType, Name, JobTitle, JobID FROM Tbl_Location a, Tbl_Jobs b WHERE JobType = " + Replace(JS__MMColParam, "'", "''"
(With the the two variables being....MMColParam = Request("jobtype"
As you can see, this only looks at values in the JobTpye and Location fields from the Tbl_Jobs table. I want the search to return results if the users choice is also in the fields JobType2, 3 or 4 or Location2, 3, or 4.
What would be the SQL statement to do this?
I hope this makes sense! Many thanks in advance!