an error stating "Fatal error: Call to undefined method mysqli_stmt::get_result() in C:\xampplite\htdocs\mydocs\appointments\appointment.php on line 10" shows up when I run my code.
This is the code below:
$stmt = $mysqli->prepare("select * from bookings where MONTH(date) = ? AND YEAR(date)=?");
$stmt->bind_param('ss', $month, $year);
$bookings = array();
if($stmt->execute()){
$result = $stmt->get_result();
if($result->num_rows>0){
while($row = $result->fetch_assoc()){
$bookings[] = $row['date'];
}
$stmt->close();
}
}