|
Searching for exact term or no result
Hello folks,
First time posting here and I am hoping some of you fine people could help me with a problem I am having.
I have a full text search box that if I type even the letter 'j' it will pull in every record with the letter 'j'.
Basically I cant figure out how to search for a term and only that term so if I type 'joe blogs' joes record will appear and if i type 'j' nothing will appear.
My apologies as I cant think of how to explain it.
The code I am using at the moment is:
//Search Query
$sql = mysql_query("SELECT * FROM UserList WHERE Name like '%$search%'");
Many Thanks,
Peter
|