try { $dbh = new PDO("sqlite:lunch.db"); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die("App is offline. Please contact David."); } ?>
foreach ($dbh->query("SELECT * FROM orders WHERE date = " . $dbh->quote($date)) as $row): ?>
= $row["name"] ?>
= $row["item"] ?> if (strlen($row["requests"]) > 0): ?> = $row["requests"] ?> endif ?> endforeach ?> |