Upload zu git.itlabs.at
This commit is contained in:
20
api/pruefungsergebnis.php
Normal file
20
api/pruefungsergebnis.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
require 'db_config.php';
|
||||
|
||||
$sql = "SELECT a.apprenticeid, firstname, lastname, groupname, examid, date_of_exam, acquired FROM `apprentice` a left join apprenticeexam e on a.apprenticeid=e.apprenticeid left join gruppe g on a.groupid = g.groupid";
|
||||
|
||||
$result = $mysqli->query($sql);
|
||||
if ($result != null)
|
||||
{
|
||||
while($row = $result->fetch_assoc()){
|
||||
$json[] = $row;
|
||||
}
|
||||
|
||||
$data = $json;
|
||||
$result = mysqli_query($mysqli,$sql);
|
||||
echo json_encode($data);
|
||||
}
|
||||
else
|
||||
echo json_encode(['success' => 0, 'message' => 'keine Daten empfangen!']);
|
||||
?>
|
Reference in New Issue
Block a user