rpicms

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

commit 17d010120b2862df8357621db1228abebb6c901c
parent ef01e2495caa1a47d8e2c9af93e1a5016b1de083
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 20 Mar 2015 17:14:24 +0100

now?

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

diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php @@ -242,12 +242,12 @@ class DbHandler { public function getPosts($post_id) { $id = $this->conn->prepare("SELECT id FROM posts"); if ($id->execute()) { - $post_id_clean_array = $id->get_result()->fetch_assoc(); + $post_id_clean_array = $id->get_result()->fetch_object(); $post_id_clean = $post_id_clean_array["id"]; } if ($post_id == NULL) { $x = 1; - var_dump($post_id_clean_array); + var_dump($post_id_clean_array["id"]); while ($x < $post_id_clean+1){ $stmt = $this->conn->prepare("SELECT id,title,text,author,category,date FROM posts WHERE id = ?"); $stmt->bind_param("i", $id);