Someone asked me this question, and my response apparently didn't help them.
So I'm asking you gurus out there :)

The person is using ASP.
They want to search an .mp3 ACCESS database with a wildcard search on Artist
and Song depending on what is entered.

Their statement is as follows:

(MP3.Genre = '::Genre::' OR MP3.Artist LIKE '%::Artist::%' OR MP3.Song LIKE
'::Song::')"
that works for artist searches

(MP3.Genre = '::Genre::' OR MP3.Artist LIKE '::Artist::' OR MP3.Song LIKE
'%::Song::%')"
works for song searches

but if I have this...
(MP3.Genre = '::Genre::' OR MP3.Artist LIKE '%::Artist::%' OR MP3.Song LIKE
'%::Song::%')"

inputing data in either artist or song field..just returns the entire
database

I can't understand why taken seperately without the %..% wildcards, this
would work.
But when combined..it doesn't.

Without testing it myself, I believe it is picking up null or space or
whatever in the fields as being present in all the Song fields/ Artist
fields and thus returning all records.

What's the workaround for this??

I'm thinking he is gonna have to use ASP code to check IF one of the fields
is Null or something and build a more complex on the fly SQL statement.

:-\

-Gel



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to