Hello,
I've got a field named genres. It's got a bunch of different music genre's
in it. I want to let a user enter a genre to search for. Here's what I'm
using now:
SELECT * FROM $mysql_artist_table WHERE genres like '$search_genre%' ORDER
BY ARTIST ASC
And that only searches at the beginning of the field.
Say a user searches for Classical:
SELECT * FROM $mysql_artist_table WHERE genres like 'Classical%' ORDER BY
ARTIST ASC
And this is the contents of the field:
Rock, Country, Classical, Punk, Rap, Metal, Hardcore
The query would never find 'Classical'. So, how can I search a field for a
string of text?
Any replies are welcome, thanks,
Tyler Longren
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php