Coolen
Coolen

Reputation: 180

Fatal error with mysqli_stmt::get_result()

I get this error message:

Fatal error: Call to undefined method mysqli_stmt::get_result() in /../../public_html/index.php on line 76

for this script:

//evenement ophalen
if($stmt = $connection->prepare('
SELECT 
    id,
    eetdatum,
    inschrijdatum,
    maaltijd,
    kostprijs,
    extra
FROM 
    maaltijden
WHERE
    eetdatum >= ?
ORDER BY
    eetdatum
    ')){
$stmt->bind_param('s', $vandaag);
$stmt->execute();
$result = $stmt->get_result();
$evenement = $result->fetch_assoc();
}
elseif($connection->error) {
echo "Er gaat iets mis: " . $connection->error;
}

The server runs on php 5.5 and has the mysqlnd driver installed. What other problem could there be with this script?

I don't think this question is a duplicate, I don't need a work around, I can find this everywhere on this forum. I would like to know what could be wrong.

Upvotes: 2

Views: 2473

Answers (1)

Aurianna
Aurianna

Reputation: 76

Sorry can't make a comment:

try adding this to your website: it will show if the driver is realy enabled:

$mysqlnd = function_exists('mysqli_fetch_all');

if ($mysqlnd) {
echo 'mysqlnd enabled!';
}else
{
echo 'mysqlnd not enabled!';
}

Upvotes: 2

Related Questions