Dateien hochladen nach „“
...
This commit is contained in:
24
apprentice_list.php
Normal file
24
apprentice_list.php
Normal 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!");
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user