|
|
|
<?php
|
|
|
|
$decode = json_decode($_POST['value'], TRUE);
|
|
|
|
$bdd = new SQLite3('../../database/ticket_panne.db', SQLITE3_OPEN_READWRITE);
|
|
|
|
$request = 'UPDATE pannes SET
|
|
|
|
dates = "' .$decode["dates"] .'",
|
|
|
|
details = "' .$decode["details"] .'",
|
|
|
|
lieu = "' .$decode["lieu"] .'",
|
|
|
|
salle = "' .$decode["salle"] .'",
|
|
|
|
pos = "' .$decode["pos"] .'",
|
|
|
|
materiel = "' .$decode["materiel"] .'",
|
|
|
|
marque = "' .$decode["marque"] .'",
|
|
|
|
model = "' .$decode["model"] .'",
|
|
|
|
nserie = "' .$decode["nserie"] .'",
|
|
|
|
demandeur = "' .$decode["demandeur"] .'",
|
|
|
|
traitement = "' .$decode["traitement"] .'"
|
|
|
|
WHERE ID= "' .$decode['id'] .'"';
|
|
|
|
$update = $bdd->query($request);
|
|
|
|
|
|
|
|
$traitement = $bdd->query("SELECT * FROM pannes WHERE ID=" .$decode['id']);
|
|
|
|
print_r(json_encode($traitement->fetchArray()));
|
|
|
|
?>
|