mahesh
mahesh

Reputation: 119

Call to undefined method mysqli_stmt::get_result() but mysqlnd seems installed

I am getting

Call to undefined method mysqli_stmt::get_result()

for the below php code at line $result = $stmt->get_result(). I am using laravel framework for this project;

   $conn = new mysqli($hostname, $username, $password, $db);
   $stmt = $conn->prepare("select name from user where username=?");
   $stmt->bind_param("s", "username");
   $stmt->execute();
   $result = $stmt->get_result();

PHP version is 5.4.43.

Below are the settings I found from phpinfo().

enter image description here

enter image description here

enter image description here

Upvotes: 3

Views: 643

Answers (1)

Your Common Sense
Your Common Sense

Reputation: 157871

Mysqli ext is built without mysqlnd support as it's absent in "API Extensions" and "Client API library version". It seems you need to recompile mysqli, or - better - just re-install it using packet manager.

Upvotes: 2

Related Questions