rpicms

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

commit 4f87a35b53fa2f078db9b047e32978ed52f720e9
parent f7a82186d7028da558c94271ba230059a596d5a2
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 20 Mar 2015 18:14:37 +0100

will this work?

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

diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php @@ -247,9 +247,9 @@ class DbHandler { $post["post_id_clean"] = $post_id_clean; } if ($post_id == NULL) { - $x = 1; + $x = 0; $id = 1; - while ($x < $post_id_clean+1){ + while ($x < $post_id_clean){ $stmt = $this->conn->prepare("SELECT id,title,text,author,category,date FROM posts WHERE id = ?"); $stmt->bind_param("i", $id); @@ -267,7 +267,7 @@ class DbHandler { $x = $x+1; $id = $id+1; } - if ($id == $post_id_clean+1){ + if ($id == $post_id_clean){ return $post; }else{ return NULL;