rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit eb48f7a3b1b1b0be77239c968a2700feda39496f
parent 1402595be82953197b307432878f9abcf5ff1d82
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 20 Mar 2015 17:23:30 +0100

maybe i found a way

Diffstat:
Mcore/api/v1/DbHandler.class.php | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php @@ -240,11 +240,10 @@ class DbHandler { * @param String $task_id id of the task */ public function getPosts($post_id) { - $id = $this->conn->prepare("SELECT id FROM posts"); + $id = $this->conn->prepare("SELECT COUNT(*) FROM posts"); if ($id->execute()) { - #$post_id_clean_array = $id->get_result()->fetch_object(); - #$post_id_clean = $post_id_clean_array["id"]; - $post_id_clean = $id->get_result()->fetch_object(); + $post_id_clean_array = $id->get_result()->fetch_assoc(); + $post_id_clean = $post_id_clean_array["id"]; } if ($post_id == NULL) { $x = 1;