From 3bdc9c5bc2a05a01945e3c1d1cc1a3b5135b6f6e Mon Sep 17 00:00:00 2001 From: alex_t_king Date: Thu, 11 Sep 2003 18:26:49 +0000 Subject: [PATCH] made the search an 'AND' search (I think) git-svn-id: http://svn.automattic.com/wordpress/trunk@367 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 .= ')';