Jump to content

Searching for words not a whole phrase problem?


munnaz

Recommended Posts

Hey, I was just wondering if you could help. I have a search and it only searches for exact phrases.

 

$query="SELECT * FROM table WHERE title like '%$searchfield%' OR description like '%$searchfield%' ORDER BY title LIMIT $offset, $rowsPerPage";
$result=mysql_query($query);

 

I was wondring if I could modify it so that if someone searches for something like 'Peeling a Banana' It seaches for the words 'peeling' and 'banana' and not the whole phrase as one?

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.