Still a PHP Novice. I got PHP Version 5.6.2 using it with MAMP. I am trying to get all table entries. Code is:
$query = "SELECT * FROM atable";
$result = $db_connection->query($query);
if(!$result){
$msg = $db_connection->error;
die("The query failed! <br/>" . $msg);
}
else {
echo "Successfull query.";
}
Everything ok until here. The fetch_assoc() works too:
$output = $result->fetch_assoc();
print_r($output);
But fetch_all() doesn't work:
$output = $result->fetch_all();
print_r($output);
I tried getting an error message but received none.
I read that older Versions of PHP do not allow fetch_all and so I tried with a while loop, which again worked just fine. What am I doing wrong? :(
Thx for your help!