Restructure & change a lot of this
This commit is contained in:
8 files changed
+139
-132
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
include __DIR__ . "/incl/util.php";
|
||||
header("Content-Type: application/json");
|
||||
|
||||
$conn = connectToDatabase();
|
||||
|
||||
$stmt = $conn->prepare("SELECT * FROM colors ORDER BY timestamp DESC");
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
echo json_encode($result);
|
||||
Reference in new issue
Block a user