i want to search all words using "and" not "or" !!!
Posted: Sat Aug 09, 2008 2:12 pm
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
hi
i use this code to search some inserts from mysql... but i would like to search the database taking into consideration all the words
this is a part from my code
I think that in this part of my code is the problem
can u help me plz to solve it...
tnx
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
hi
i use this code to search some inserts from mysql... but i would like to search the database taking into consideration all the words
this is a part from my code
Code: Select all
//search variable = data in search box or url
if(isset($_GET['search']))
{
$search = $_GET['search'];
}
//trim whitespace from variable
$search = trim($search);
$search = preg_replace('/\s+/', ' ', $search);
//seperate multiple keywords into array space delimited
$keywords = explode(" ", $search);
//Clean empty arrays so they don't get every row as result
$keywords = array_diff($keywords, array(""));I think that in this part of my code is the problem
can u help me plz to solve it...
tnx
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: