<?php
include 'db.php';

$idvisi = $_GET['idvisi'];
$data=array();
 
 $q=mysqli_query($conn, "SELECT `NOMBRE-VISITAS` as namev, `APELLIDO-VISITAS` as apellidov, 
 `EMAIL-VISITAS` as emailv, `CEL-VISITAS` as celularv,`COMENT-VISITAS` as cvisita, `PLACAS-VISITAS` as pvisita, 
 `TIPO-VEHICULO_idTIPO-VEHICULO` as tvvisita, `MARCA-VEHICULOV` as marcav, `TIPO-IDENTI_idTIPO-IDENTI` as tidenti, 
 `MODELO-VISITAS` as modvisita, `COLOR-VEHICULO_idCOLOR-VEHICULO` as colorv, `TIPO-VISITAS` as accesov FROM `d-visitas`
 WHERE `idD-VISITAS` = '$idvisi'");
while ($row=mysqli_fetch_object($q)){
 $data[]=$row;
}
echo json_encode($data);


?>

