query($sql)->fetchAll(); print_r($scheduled_appointments); } catch (PDOException $e) { echo "Error: " . $e->getMessage(); }