commit b9f9cb374ff8f8e63e070f201eb0105dcacff4ee
parent 952064a2e7e7b54d3ea19135addf68eac0cdc164
Author: MTRNord <mtrnord1@gmail.com>
Date: Fri, 20 Mar 2015 17:11:56 +0100
more debug
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php
@@ -241,13 +241,13 @@ class DbHandler {
*/
public function getPosts($post_id) {
$id = $this->conn->prepare("SELECT id FROM posts");
- while ($id->execute()) {
+ if ($id->execute()) {
$post_id_clean_array = $id->get_result()->fetch_assoc();
$post_id_clean = $post_id_clean_array["id"];
}
if ($post_id == NULL) {
$x = 1;
- echo $post_id_clean;
+ echo $post_id_clean_array;
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);