mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-29 19:10:29 +00:00
[add] function to get tags by entry
This commit is contained in:
parent
9e7c840b18
commit
5bea1a4d31
1 changed files with 11 additions and 0 deletions
|
@ -249,4 +249,15 @@ class Database {
|
|||
public function getLastId($column = '') {
|
||||
return $this->getHandle()->lastInsertId($column);
|
||||
}
|
||||
|
||||
public function retrieveTagsByEntry($entry_id) {
|
||||
$sql =
|
||||
"SELECT * FROM tags
|
||||
LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
|
||||
WHERE tags_entries.entry_id = ?";
|
||||
$query = $this->executeQuery($sql, array($entry_id));
|
||||
$tags = $query->fetchAll();
|
||||
|
||||
return $tags;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue