diff options
Diffstat (limited to 'inc/poche/Database.class.php')
-rw-r--r-- | inc/poche/Database.class.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index c233eda1..86907e52 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -249,4 +249,15 @@ class Database { | |||
249 | public function getLastId($column = '') { | 249 | public function getLastId($column = '') { |
250 | return $this->getHandle()->lastInsertId($column); | 250 | return $this->getHandle()->lastInsertId($column); |
251 | } | 251 | } |
252 | |||
253 | public function retrieveTagsByEntry($entry_id) { | ||
254 | $sql = | ||
255 | "SELECT * FROM tags | ||
256 | LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id | ||
257 | WHERE tags_entries.entry_id = ?"; | ||
258 | $query = $this->executeQuery($sql, array($entry_id)); | ||
259 | $tags = $query->fetchAll(); | ||
260 | |||
261 | return $tags; | ||
262 | } | ||
252 | } | 263 | } |