diff --git a/inside/Documents.php b/inside/Documents.php index 05486a3..78b7a4e 100644 --- a/inside/Documents.php +++ b/inside/Documents.php @@ -90,10 +90,11 @@ function displayListTag($tag = NULL){ if ($tag == NULL){ return false; } + $tags = implode("%' AND tags LIKE '%", explode(" ", $tag)); $sql = "SELECT d.*, dc.title AS category FROM din_document d, din_documentcategory dc WHERE d.documentcategory_id = dc.id " . - "AND tags LIKE '%$tag%' " . + "AND tags LIKE '%$tags%' " . "ORDER BY name ASC"; $result =& $this->conn->query($sql);