SQL query running in PhpMyAdmin panel but not running in Php script
<p>I have a query that is giving me a headache, its running when I put in phpmyadmin but not producing any output not even an error when ran put in a script, I cant say its the connection or anything, I have another file almost exactly as this one and it works flawlessly but not this one, at least even an error at this point would be appreciated, below is my script:</p>

<pre><code>&lt;?php

require_once 'include/DB_Connect.php';
$db = new Db_Connect();
$conn = $db-&gt;connect();




// get all comments table
$result = $conn-&gt;prepare("SELECT sale_comments._id ,sale_comments._user_fk, 
                                 users._fname, users._lname, 
                                 sale_comments._comment,
                                 sale_comments._date_created 
                            FROM sale_comments, users 
                            WHERE sale_comments._user_fk = users._id 
                            ORDER BY sale_comments._date_created DESC ");
$result-&gt;execute();

$response["comments"] = array();
$result-&gt;bind_result($id, $user_fk, $fname, $lname, $comment, $date_created);


while($row = $result-&gt;fetch()) 
{
    $comment = array();
    $comment["id"] = $id;
    $comment["user_fk"] = $user_fk;
    $comment["fname"] =$fname;
    $comment["lname"] = $lname;  
    $comment["comment"] = $comment;
    $comment["date_created"] = $date_created;


    $response["message"] = "Loaded";
     $response["error"] = FALSE;
    array_push($response["comments"], $comment);

}

echo json_encode($response);

?&gt;
</code></pre>

<p>And my other script which is running perfectly</p>

<pre><code>&lt;?php


 require_once 'include/DB_Connect.php';
$db = new Db_Connect();
$conn = $db-&gt;connect();




// get all products from products table
 $result = $conn-&gt;prepare("SELECT _id, _user_fk, _title, _description, _price, _currency,  _category, _location, _image, _date_created FROM sales  ORDER BY _date_created DESC");
$result-&gt;execute();

$response["sales"] = array();
$result-&gt;bind_result($id, $user_fk, $title, $description, $price, $currency, $category, $location, $image, $date_created);


while($row = $result-&gt;fetch()) 
{
    $sale = array();
    $sale["id"] = $id;
    $sale["user_fk"] = $user_fk;  
    $sale["title"] = $title;
    $sale["description"] =$description;
    $sale["price"] = $price;
    $sale["currency"] = $currency;
    $sale["category"] = $category;
    $sale["location"] = $location;
    $sale["image"] = $image;
    $sale["date_created"] = $date_created;


    $response["message"] = "Loaded";
    array_push($response["sales"], $sale);

}

echo json_encode($response);



?&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/mR6x2.png" rel="nofollow"><img src="https://i.stack.imgur.com/mR6x2.png" alt="Image showing both my files are in the same folder"></a></p>

<p><a href="https://i.stack.imgur.com/MLXyv.png" rel="nofollow"><img src="https://i.stack.imgur.com/MLXyv.png" alt="Image showing the same query running in phpmyadmin"></a></p>

<p><a href="https://i.stack.imgur.com/wHEFN.png" rel="nofollow"><img src="https://i.stack.imgur.com/wHEFN.png" alt="Image showing the file not displaying anything when ran in browser"></a></p>