up
This commit is contained in:
6
public/api/materials.php
Executable file
6
public/api/materials.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
// public/api/materials.php
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
require __DIR__ . '/_db.php';
|
||||
$stmt = $pdo->query("SELECT * FROM materials WHERE is_active = 1 ORDER BY code");
|
||||
echo json_encode($stmt->fetchAll(), JSON_UNESCAPED_UNICODE);
|
||||
Reference in New Issue
Block a user