commit 84e31033201e6a25367524a032c79f902ed0143e
parent 6300209a5ac11bb62137fd9484bf5d5fcd1c2c34
Author: MTRNord <mtrnord1@gmail.com>
Date: Thu, 19 Mar 2015 21:32:35 +0100
new try to fix
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php
@@ -242,11 +242,11 @@ class DbHandler {
public function getPosts($post_id) {
$id = $this->conn->prepare("SELECT id FROM posts");
if ($id->execute()) {
- $post_id_clean = $id->get_result()->fetch_assoc();
+ $post_id_clean_array = $id->get_result()->fetch_assoc();
+ $post_id_clean = $post_id_clean_array["id"];
}
if ($post_id == NULL) {
$x = 1;
- var_dump($post_id_clean);
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);