MySQL query is only showing information if I have a condition in the SQL statement.
I've successfully used the SQL statement in phpmyadmin and it works great. I've changed the table name in the PHP code and it functions properly, the "people" table is the only one that causes a problem.
<?php
include 'dbconnectLocal.php';
$sql = "SELECT * FROM people WHERE nameFirst = 'Karen'";
$billings = array();
$billingResults = mysqli_query($connL, $sql);
while($row = mysqli_fetch_assoc($billingResults)){
$billings[] = $row;
}
mysqli_close($connL);
$jsonOutput = json_encode($billings);
print("<pre>".json_encode($billings, JSON_PRETTY_PRINT)."</pre>");
?>
The above code produces the desired result, it gives me a JSON result of everyone whos name is Karen. But if I were to change it to $sql = "SELECT * FROM people" I get a blank screen.