<?php
include 'db.php';

$data=array();

$q=mysqli_query($conn, "SELECT `ACCESOT`, `LLEGADAT`, `NAMECT`, `APECT`,  `TPASET`, `TACCESOT` FROM `QREMPLEADOS` WHERE `IDUSERT`= '$idusercaf' AND `STATUSA`= '0' ORDER BY `LLEGADAT` DESC");
while ($row=mysqli_fetch_object($q)){
 $data[]=$row;
}
echo json_encode($data);

?>

