Logica para obtener los veterinarios
[isfdt166-ansi-edi2-2024-server.git] / code / get_veterinario.php
blob3dc415b48002708b42a6f40ea4629d79761a226e
1 <?php
3 function handle_request()
5 $list = [];
7 $db = new SQLite3('database.sqlite');
8 $result = $db->query('SELECT * FROM veterinario');
10 while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
11 $list[] = [
12 'id' => $row['id'],
13 'nombre' => $row['nombre'],
17 $db->close();
19 echo json_encode($list);