Dateien hochladen nach „“

...
This commit is contained in:
2023-01-08 23:58:21 +01:00
parent 2e41195d49
commit 143c969250
5 changed files with 100 additions and 0 deletions

24
apprentice_list.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
require './db_config.php';
$sql = "SELECT apprenticeid, firstname, lastname, a.groupid, groupname, sex, date_of_birth, date_joined, date_leave ";
$sql .= "FROM apprentice a left join gruppe g on a.groupid = g.groupid ";
$result = $mysqli->query($sql);
if ($result != null)
{
while($row = $result->fetch_assoc()){
$json[] = $row;
}
$data['apprentice'] = $json;
$result = mysqli_query($mysqli,$sql);
echo json_encode($data);
}
else
echo json_encode("keine Daten empfangen!");
?>