mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 18:30:17 +01: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