mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 11:22:17 -05:00
[add] function to get tags by entry
This commit is contained in:
parent
9e7c840b18
commit
5bea1a4d31
@ -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 New Issue
Block a user