Allow searching for arbitrary tags on documents (not just either one or all tags)
This commit is contained in:
1 parent
b4f02e390b
commit
351a404067
1 file changed
+2
-1
@@ -90,10 +90,11 @@ class Documents {
|
||||
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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user