aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Database.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 13:15:06 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 13:15:06 +0100
commit2e2ebe5ec767dcbee90394d12b03298592c87805 (patch)
treec62599a66288c6a77eeeac3bc968e3024100386e /inc/poche/Database.class.php
parent68e20616663e048d47297ff251f64081b1d1fe3a (diff)
downloadwallabag-2e2ebe5ec767dcbee90394d12b03298592c87805.tar.gz
wallabag-2e2ebe5ec767dcbee90394d12b03298592c87805.tar.zst
wallabag-2e2ebe5ec767dcbee90394d12b03298592c87805.zip
[add] create tags page
Diffstat (limited to 'inc/poche/Database.class.php')
-rw-r--r--inc/poche/Database.class.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 86907e52..8e9ee0b7 100644
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -250,13 +250,21 @@ class Database {
250 return $this->getHandle()->lastInsertId($column); 250 return $this->getHandle()->lastInsertId($column);
251 } 251 }
252 252
253 public function retrieveAllTags() {
254 $sql = "SELECT * FROM tags";
255 $query = $this->executeQuery($sql, array());
256 $tags = $query->fetchAll();
257
258 return $tags;
259 }
260
253 public function retrieveTagsByEntry($entry_id) { 261 public function retrieveTagsByEntry($entry_id) {
254 $sql = 262 $sql =
255 "SELECT * FROM tags 263 "SELECT * FROM tags
256 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id 264 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
257 WHERE tags_entries.entry_id = ?"; 265 WHERE tags_entries.entry_id = ?";
258 $query = $this->executeQuery($sql, array($entry_id)); 266 $query = $this->executeQuery($sql, array($entry_id));
259 $tags = $query->fetchAll(); 267 $tags = $query->fetchAll();
260 268
261 return $tags; 269 return $tags;
262 } 270 }