From d4ed21081cf62b8b6a96cb64ef3213abb1727c63 Mon Sep 17 00:00:00 2001 From: Vincent Jousse Date: Fri, 22 Nov 2013 16:38:49 +0100 Subject: [PATCH] Get all entries --- src/Poche/Api/EntryApi.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Poche/Api/EntryApi.php b/src/Poche/Api/EntryApi.php index 878cae1..7ec71e5 100644 --- a/src/Poche/Api/EntryApi.php +++ b/src/Poche/Api/EntryApi.php @@ -11,7 +11,8 @@ class EntryApi } public function getEntries() { - //Todo - return array(); + $sql = "SELECT * FROM entries"; + $entries = $this->db->fetchAssoc($sql); + return ($entries ? $entries : array()); } }