ID: 88
Viewed: 5458
Added: Feb 22, 2002
Version:
Snippet uploaded by: snippet
Written By: snippet
Demo: Sorry, no demo
Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty
this little script will search a database for the searched words. the advantage is that if the user enters more than one work seperated by spaces, it will break them apart at the space and search for each individual one.
<!---Head--->
none
<!---Body--->
<?php
$search = "your text here";
$search_words = explode(' ', $search);
$result = mysql_query ("SELECT * FROM table WHERE $category LIKE '%$search_words[0]%' AND $category LIKE '%$search_words[1]%' AND $category LIKE '%$search_words[2]%'");
?>
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.