How can I make my search more broad?

Posted by user1804952 on Stack Overflow See other posts from Stack Overflow or by user1804952
Published on 2012-11-10T21:04:23Z Indexed on 2012/11/10 23:00 UTC
Read the original article Hit count: 286

Filed under:
|

I created this search mysql string and it is to literal or maybe un-literal? If I search for Dave for example it will only find items like "Dave something" and not find Dave.

$queryArtist = mysql_query("SELECT * FROM artists WHERE artist LIKE '%$ArtistNameSearch%' ORDER BY artist ASC");

I know mysql_query is out dated and will change it to mysqli soon as I get this worked out. Stuck here.

An example of it no working is Example of search

Could it be becasue the %20 space?

I got it figured out, but it still does NOT find one direction or other things even those exist. here is what I have now

$queryArtist = mysql_query("SELECT * FROM artists WHERE match(artist) against('$SafeSearchTerm' in boolean mode)");

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql