-
Notifications
You must be signed in to change notification settings - Fork 0
/
datatickd.php
30 lines (18 loc) · 860 Bytes
/
datatickd.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
include('./connecto.php');
$header1 = json_decode(file_get_contents("php://input"));
require './vendor/autoload.php';
use Doctrine\DBAL\DriverManager;
$db = $con;
$ticket = $header1->ticket;
/* $zone = substr($header1->zone, 4, 2);
$div = substr($header1->zone, 3, 2);
$typeu = $header1->typeu;
*/
$Query = "";
$Query = "select zafrad, ticket,ifnull(concat(fletero,' ',fullnamefleter),' Sin Asignar ') as fletero, concat(clave,' ',nombre) as productor,concat(alzadora,' ',fullnamelifting) as alzadora,concat('Orden ',orden,' Zona ',zona,' Tabla ',tabla) as detalle,DATE_FORMAT(arrivaldate,'%d-%m-%y') as arrivaldate from canes_tempo where ticket = " . $ticket . " and zafrad = zafraday()";
$statement = $db->prepare($Query);
$resultSet = $statement->execute();
$movi = $resultSet->fetchAllAssociative();
$db = null;
echo json_encode($movi);