commit 3627b8f59b666d1b218a46676f85613385bf07bf
parent 2c229c0618eb41fbbf34436ec0151119987c15bf
Author: MTRNord <mtrnord1@gmail.com>
Date: Wed, 18 Mar 2015 21:31:40 +0100
it works
Diffstat:
2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/core/api/v1/DbHandler.class.php b/core/api/v1/DbHandler.class.php
@@ -241,18 +241,14 @@ class DbHandler {
*/
public function getPosts($post_id) {
if ($post_id == NULL) {
- echo "id=null";
return $all;
}else{
- echo "id=$post_id";
$stmt = $this->conn->prepare("SELECT id,title,text,author,category,date FROM posts WHERE id = ?");
$stmt->bind_param("i", $post_id);
- print_r($stmt);
if ($stmt->execute()) {
$post = $stmt->get_result()->fetch_assoc();
$stmt->close();
- echo $post;
return $post;
} else {
return NULL;
diff --git a/core/api/v1/api.php b/core/api/v1/api.php
@@ -153,7 +153,6 @@ $app->get('/posts/:id', function($post_id) {
// fetch task
$result = $db->getPosts($post_id);
- var_dump($result);
if ($result != NULL) {
$response["error"] = false;