slap bug #3068, fix pkg searching in pkgnames

This commit is contained in:
simo 2005-08-12 04:22:41 +00:00
parent e728d27560
commit f99ef319fd

View file

@ -759,11 +759,11 @@ function pkg_search_page($SID="") {
} }
if ($K) { if ($K) {
if (!$has_where) { if (!$has_where) {
$q.= "WHERE (Name LIKE '".mysql_escape_string($K)."%' OR "; $q.= "WHERE (Name LIKE '%".mysql_escape_string($K)."%' OR ";
$q.= "Description LIKE '%".mysql_escape_string($K)."%') "; $q.= "Description LIKE '%".mysql_escape_string($K)."%') ";
$has_where = 1; $has_where = 1;
} else { } else {
$q.= "AND (Name LIKE '".mysql_escape_string($K)."%' OR "; $q.= "AND (Name LIKE '%".mysql_escape_string($K)."%' OR ";
$q.= "Description LIKE '%".mysql_escape_string($K)."%') "; $q.= "Description LIKE '%".mysql_escape_string($K)."%') ";
} }
} }