rpicms

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

commit 8c32ec842d8f7f71056ae5ac7e6cefef4b705472
parent a498e444ee3bf9d2055b7b3d094dc5bb14d61904
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 20 Mar 2015 17:36:08 +0100

new try

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

diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php @@ -247,16 +247,17 @@ class DbHandler { } if ($post_id == NULL) { $x = 1; + while ($x < $post_id_clean+1){ + echo $x; + echo "</br>"; + echo $id; + echo "</br>"; + echo $post_id_clean; $stmt = $this->conn->prepare("SELECT id,title,text,author,category,date FROM posts WHERE id = ?"); $stmt->bind_param("i", $id); if ($stmt->execute()) { $post["$x"] = $stmt->get_result()->fetch_assoc(); - echo $x; - echo "</br>"; - echo $id; - echo "</br>"; - echo $post_id_clean; if ($post["$x"]["text"] != NULL){ $post["$x"]["text"] = html_entity_decode($post["text"]); }else{ @@ -264,8 +265,8 @@ class DbHandler { } $stmt->close(); return $post; - } else { - return NULL; + } else { + return NULL; } $x = $x+1; $id = $id+1;