1

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.

Vigs
  • 1,286
  • 3
  • 13
  • 30
  • did you solve this issue. If yes. Please do tell – Siddharth Srivastva Apr 18 '14 at 16:01
  • `$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. – Vigs Apr 19 '14 at 16:56
  • Does `phpinfo();` list the module as enabled? – ek9 Apr 19 '14 at 17:01
  • @edvinas.me, yes it does, it falls under mysql, then look for the Client API Version something like "mysqlnd 5.0.11-dev - 20120503 - $Id: f373ea5dd5538761406a8022a4b8a374418b240e $ " – mirageservo May 29 '15 at 14:16

0 Answers0