Hello,
I’m fetching rows from my MySqli database and the fetch_assoc() / mysqli_fetch_assoc() function isn’t working.
My code:
$stmtnota = $conn->prepare('SELECT * FROM nota WHERE Factuurnummer = ?');
$stmtnota->bind_param('i', $factuurnummer);
$stmtnota->execute();
$resultnota = $stmtnota->get_result();
if(!$rownota = $resultnota->fetch_assoc()) {
echo 'Fail';
}
It’s not working. I see ‘Fail’.
But there’s no error message. The preparing, binding and executing of the query is going seemless.
Except the fetching of the rows. I don’t know.
I’ve tried echo error_get_last();
, but that doesn’t give any errors.
I don’t get any errors at all…
But still it doesn’t work for some reason.
Can anyone help me?
With kind regards,