diff options
Diffstat (limited to 'inc/poche/Database.class.php')
-rwxr-xr-x | inc/poche/Database.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 823f834c..1a88d7d9 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -435,7 +435,7 @@ class Database { | |||
435 | 435 | ||
436 | public function getPreviousArticle($id, $user_id) | 436 | public function getPreviousArticle($id, $user_id) |
437 | { | 437 | { |
438 | $sql = "SELECT id FROM entries WHERE id = (SELECT max(id) FROM entries WHERE id < ?) AND user_id=? AND is_read=0"; | 438 | $sql = "SELECT id FROM entries WHERE id = (SELECT max(id) FROM entries WHERE id < ? AND is_read=0) AND user_id=? AND is_read=0"; |
439 | $params = array($id, $user_id); | 439 | $params = array($id, $user_id); |
440 | $query = $this->executeQuery($sql, $params); | 440 | $query = $this->executeQuery($sql, $params); |
441 | $id_entry = $query->fetchAll(); | 441 | $id_entry = $query->fetchAll(); |
@@ -445,7 +445,7 @@ class Database { | |||
445 | 445 | ||
446 | public function getNextArticle($id, $user_id) | 446 | public function getNextArticle($id, $user_id) |
447 | { | 447 | { |
448 | $sql = "SELECT id FROM entries WHERE id = (SELECT min(id) FROM entries WHERE id > ?) AND user_id=? AND is_read=0"; | 448 | $sql = "SELECT id FROM entries WHERE id = (SELECT min(id) FROM entries WHERE id > ? AND is_read=0) AND user_id=? AND is_read=0"; |
449 | $params = array($id, $user_id); | 449 | $params = array($id, $user_id); |
450 | $query = $this->executeQuery($sql, $params); | 450 | $query = $this->executeQuery($sql, $params); |
451 | $id_entry = $query->fetchAll(); | 451 | $id_entry = $query->fetchAll(); |