simmerdown
Programmer
Here's the basic query:
[COLOR=006699]
[/color]
I'm trying to modify the query to exclude any results that have the word 'Modem' as a part of the LastName field. I've tried including WHERE [COLOR=006699]
[/color] and a few other variations on that theme, but with no success so far. The results that have the word 'Modem' still show up. Any solutions? [sig][/sig]
[COLOR=006699]
Code:
<cfquery datasource="staff_directory" name="personinfo">
SELECT PersonID, FirstName, NickName, MiddleName, LastName
FROM Person
WHERE 0=0
AND FirstName LIKE '%#Form.Name#%'
OR LastName LIKE '%#Form.Name#%'
OR NickName LIKE '%#Form.Name#%'
ORDER BY LastName
</cfquery>
I'm trying to modify the query to exclude any results that have the word 'Modem' as a part of the LastName field. I've tried including WHERE [COLOR=006699]
Code:
NOT LastName LIKE '%Modem%'