aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Database.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Database.class.php')
-rwxr-xr-xinc/poche/Database.class.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 9e901974..11cccb72 100755
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -409,6 +409,7 @@ class Database {
409 public function add($url, $title, $content, $user_id, $isFavorite=0, $isRead=0) { 409 public function add($url, $title, $content, $user_id, $isFavorite=0, $isRead=0) {
410 $sql_action = 'INSERT INTO entries ( url, title, content, user_id, is_fav, is_read ) VALUES (?, ?, ?, ?, ?, ?)'; 410 $sql_action = 'INSERT INTO entries ( url, title, content, user_id, is_fav, is_read ) VALUES (?, ?, ?, ?, ?, ?)';
411 $params_action = array($url, $title, $content, $user_id, $isFavorite, $isRead); 411 $params_action = array($url, $title, $content, $user_id, $isFavorite, $isRead);
412
412 if ( !$this->executeQuery($sql_action, $params_action) ) { 413 if ( !$this->executeQuery($sql_action, $params_action) ) {
413 $id = null; 414 $id = null;
414 } 415 }
@@ -487,7 +488,7 @@ class Database {
487 $sql = 488 $sql =
488 "SELECT entries.* FROM entries 489 "SELECT entries.* FROM entries
489 LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id 490 LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id
490 WHERE tags_entries.tag_id = ? AND entries.user_id=?"; 491 WHERE tags_entries.tag_id = ? AND entries.user_id=? ORDER by entries.id DESC";
491 $query = $this->executeQuery($sql, array($tag_id, $user_id)); 492 $query = $this->executeQuery($sql, array($tag_id, $user_id));
492 $entries = $query->fetchAll(); 493 $entries = $query->fetchAll();
493 494