formulaire pour remplir des ticket de panne
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
1.1 KiB

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