]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Database.class.php
alternative random function to fix #1082
[github/wallabag/wallabag.git] / inc / poche / Database.class.php
index a987b7cc7be88e8551574357cc3ef998e94b818b..210ebb74cc279b0f55d61cced87dd46108f36206 100755 (executable)
@@ -411,6 +411,14 @@ class Database {
 
         return $count;
     }
+    public function getRandomId($row, $user_id) {
+       $sql = "SELECT id FROM entries WHERE user_id=? LIMIT 1 OFFSET ? ";
+       $params = array($user_id, $row);
+       $query = $this->executeQuery($sql, $params);
+
+       return $query->fetchAll();
+    }
+
 
     public function updateContent($id, $content, $user_id)
     {