Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Allow searching for arbitrary tags on documents #1

Merged
merged 1 commit into from
Mar 13, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion inside/Documents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down