<?php
include 'db.php';

$data=array();

$q=mysqli_query($conn, "SELECT `idD-EMPLEADOS`as idemple,`NOMBRE-EMPLEADOS` as nombre, `APELLIDO-EMPLEADOS` as apellido FROM `d-empleados` WHERE `user-caf_idUSER-CAF` = '$idusercaf' AND `FRECUENTE-EMPLEADOS`= 1");

while ($row=mysqli_fetch_object($q)){
 $data[]=$row;
}
echo json_encode($data);

?>

