Reputation: 119
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()
.
Upvotes: 3
Views: 643
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