Hi there i am struggling to code a table that will display the query that i have written into the browser. I have tried multiple times but have failed. Can someone help me format a view for the following query ?
$db = new PDO('sqlite:daypilot.sqlite');
$start = '2018-02-20';
$end = '2018-02-25';
$sql = 'SELECT * FROM events WHERE end > ? AND start < ?';
$stmt = $db->prepare($sql); $stmt->execute([$start, $end]);
$events = $stmt->fetchAll();
foreach ($events as $event) {
var_dump($event); // output with your desired formatting here
}