From f14807de06929486de6e2b64cd30e5c53978d8c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= <nicolas.loeuillet@gmail.com>
Date: Wed, 12 Feb 2014 21:52:01 +0100
Subject: [add] mark all as read #385

---
 inc/poche/Database.class.php | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'inc/poche/Database.class.php')

diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 0457af69..9f553fa1 100644
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -318,6 +318,12 @@ class Database {
         $query          = $this->executeQuery($sql_action, $params_action);
     }
 
+    public function archiveAll($user_id) {
+        $sql_action     = "UPDATE entries SET is_read=? WHERE user_id=? AND is_read=?";
+        $params_action  = array($user_id, 1, 0);
+        $query          = $this->executeQuery($sql_action, $params_action);
+    }
+
     public function getLastId($column = '') {
         return $this->getHandle()->lastInsertId($column);
     }
-- 
cgit v1.2.3