If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Newbie Search Question

I am trying to create a search for a database with 2 tables related by Employee_Id, so that when the user inputs a search parameter like the Location of training it will show all the results of that search. Below is what I have so far, but instead of just results for the single search parameter, I get everything in the database.

<cfquery name="GetEmployee" datasource="CF_CSTS_DSN" >
SELECT *
FROM CST_EmployeeTraining INNER JOIN CST_Employee ON CST_EmployeeTraining.Employee_Id=CST_Employee.Empl oyee_Id
WHERE CST_Employee.Employee_ID LIKE '%#form.search#%'
OR CST_Employee.First_Name LIKE '%#form.search#%'
OR CST_Employee.Last_Name LIKE '%#form.search#%'
OR CST_Employee.District LIKE '%#form.search#%'
OR CST_Employee.Department LIKE '%#form.search#%'
OR CST_EmployeeTraining.Training_Desc LIKE '%#form.search#%'
OR CST_EmployeeTraining.Training_Dt LIKE '%#form.search#%'
OR CST_EmployeeTraining.Training_Type LIKE '%#form.search#%'
OR CST_EmployeeTraining.Training_Location LIKE '%#form.search#%'
</cfquery>