[thelist] sql and databases
Brian Cummiskey
Brian at hondaswap.com
Fri Aug 13 17:13:42 CDT 2004
Andrew Martin wrote:
> I am working on a site for a record store. They have a database full
> of artist names and album titles.
>
> Using ASP, I currently use LIKE as a sql term, so SELECT * WHERE
> artist LIKE '%" & searchterm & "%'"
>
> If someone searches for "JOHNNY CASH AND THE FUNKY FRESH BAND" and the
> actual artist title is JOHNNY CASH WITH THE FUNKY FRESH BAND, no
> results appear.
>
> "johnny cash funky fresh" also would not turn up any results because
> that exact phase is not in the database.
>
> How do I perform a more complicated search? Are there tutorials
> anywhere for this?
>
> Thanks!
i would split the search string on the space char, and create an array like:
'firstword', 'secondword', 'etc'
then do the select * where track_name IN (Arrary)
not sure how ASP does arrays and splitting, so i can't help you there.
More information about the thelist
mailing list