diff --git a/src/store/ResultHandlers.php b/src/store/ResultHandlers.php index 892d551..c00c781 100644 --- a/src/store/ResultHandlers.php +++ b/src/store/ResultHandlers.php @@ -24,12 +24,11 @@ public static function getDBHandler($db) public static function getDBGeneratorHandler($db) { return function($query, $args) use ($db) { - $q = $db->prepare('select * from nodes where '.$query); + $q = $db->prepare('select * from nodes where '.$query, array( + \PDO::ATTR_CURSOR => \PDO::CURSOR_SCROLL + )); $result = $q->execute($args); $data = $q->fetch(\PDO::FETCH_ASSOC); - if (!$data) { - return $data; - } while ($data) { $value = (object) $data; $value->data = json_decode($value->data);