repo.or.cz
/
isfdt166-ansi-edi2-2024-server.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Logica para obtener los veterinarios
[isfdt166-ansi-edi2-2024-server.git]
/
code
/
get_veterinario.php
blob
3dc415b48002708b42a6f40ea4629d79761a226e
1
<
?php
2
3
function
handle_request
()
4
{
5
$list
= [];
6
7
$db
=
new
SQLite3
(
'database.sqlite'
);
8
$result
=
$db
->
query
(
'SELECT * FROM veterinario'
);
9
10
while
(
$row
=
$result
->
fetchArray
(
SQLITE3_ASSOC
)) {
11
$list
[] = [
12
'id'
=>
$row
[
'id'
],
13
'nombre'
=>
$row
[
'nombre'
],
14
];
15
}
16
17
$db
->
close
();
18
19
echo
json_encode
(
$list
);
20
}