From 4e4cc84c13f34ae66ffd2365b4dc93fc16a39fd8 Mon Sep 17 00:00:00 2001 From: Alex King Date: Thu, 11 Sep 2003 18:26:49 +0000 Subject: [PATCH] made the search an 'AND' search (I think) git-svn-id: https://develop.svn.wordpress.org/trunk@367 602fd350-edb4-49c9-b593-d223f7449a82 --- blog.header.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog.header.php b/blog.header.php index 22f9c3dd1f..68e11c2964 100644 --- a/blog.header.php +++ b/blog.header.php @@ -109,9 +109,9 @@ if (!empty($s)) { } if (!$sentence) { $s_array = explode(' ',$s); - $search .= '(post_title LIKE \''.$n.$s_array[0].$n.'\') OR (post_content LIKE \''.$s_array[0].'\')'; + $search .= '((post_title LIKE \''.$n.$s_array[0].$n.'\') OR (post_content LIKE \''.$s_array[0].'\'))'; for ( $i = 1; $i < count($s_array); $i = $i + 1) { - $search .= ' OR (post_title LIKE \''.$n.$s_array[$i].$n.'\') OR (post_content LIKE \''.$n.$s_array[$i].$n.'\')'; + $search .= ' AND ((post_title LIKE \''.$n.$s_array[$i].$n.'\') OR (post_content LIKE \''.$n.$s_array[$i].$n.'\'))'; } $search .= ' OR (post_title LIKE \''.$n.$s.$n.'\') OR (post_content LIKE \''.$n.$s.$n.'\')'; $search .= ')';