I use queries similar to this all throughout my app:
$stmt = $connection->stmt_init();
$sql = "SELECT * FROM table";
$stmt->prepare($sql);
$stmt->execute();
$results = $stmt->get_results();
When I went to test some on my live server, it appears that $stmt->get_results();
craps out.
I recieve no error, or anything like that, it just does... nothing?
Using the magic of google it appears that for $stmt->get_results();
to work, you need to have mysqlnd installed.
Can anyone solidify this? Also, Why would mysqlnd not be installed on a server? I have seen some users say they are unable to get it installed, why would a hosting provider be unwilling to offer this?
Finally; is there any way to check (other than running the function and getting no results), if the mysqlnd is available or not?
As always, Thanks SO
Edit
I see there are some references to mysqlnd in my php.ini, but nothing that would appear to have it disabled. Is there a setting / settings in the php.ini that need to be configred for myslnd to function?
Answer
I dont feel this is worthy of answering my own question, but this is what i ended up with:
$results = $stmt->get_results();
needs to be $results = $stmt->get_result();
also I had to contact my hosting provider and have them "re install" mysqlnd as the previous install was not complete.