Hi,

I need some help with this query:

SELECT *
FROM myTable
WHERE active = '1'
OR fname LIKE '%#FORM.search#%'
OR sname LIKE '%#FORM.search#%'
OR company LIKE '%#FORM.search#%'

I would like to select all records which have an active setting of 1 and match the form search submission. The problem is its selecting anything with an active status of 1 or a match to the form search submission.

Any help would be much appreciated,
Thanks,


Richard