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 31 32 33 34 35 36 37 38
| $date_rdv=date('Y-m-d', strtotime($_POST['date_rdv']));
$date_vente=date('Y-m-d', strtotime($_POST['date_vente']));
$date_relance=date('Y-m-d', strtotime($_POST['date_relance']));
$req = Cnx::connectCnx()->prepare("UPDATE contacts c, financement f SET c.nom=:nom, c.prenom=:prenom, c.adresse=:adresse, c.cp=:cp, c.ville=:ville, c.tel1=:tel1, c.tel2=:tel2, c.mail=:mail, c.produit=:produit, c.ref=:ref, c.ttc=:ttc, c.tva=:tva, c.devis=:devis, c.remise=:remise, c.rdv_pris=:rdv_pris, c.vente=:vente, c.relance=:relance, c.origine=:origine, c.annulation=:annulation, c.details1=:details1, c.details2=:details2, c.details3=:details3, c.details4=:details4, c.details5=:details5, c.details6=:details6, c.date_rdv=:date_rdv, c.date_vente=:date_vente, c.date_relance=:date_relance, f.paiement_esp=:paiement_esp WHERE f.id_contact=c.id AND c.id=:id ") ;
$req -> bindParam(':id', $_POST['id'], PDO::PARAM_INT, 11);
$req -> bindParam(':nom', $_POST['nom']);
$req -> bindParam(':prenom', $_POST['prenom']);
$req -> bindParam(':adresse', $_POST['adresse']);
$req -> bindParam(':cp', $_POST['cp']);
$req -> bindParam(':ville', $_POST['ville']);
$req -> bindParam(':tel1', $_POST['tel1']);
$req -> bindParam(':tel2', $_POST['tel2']);
$req -> bindParam(':mail', $_POST['mail']);
$req -> bindParam(':produit', $_POST['produit']);
$req -> bindParam(':ref', $_POST['ref']);
$req -> bindParam(':ttc', $_POST['ttc']);
$req -> bindParam(':tva', $_POST['tva']);
$req -> bindParam(':devis', $_POST['devis']);
$req -> bindParam(':remise', $_POST['remise']);
$req -> bindParam(':rdv_pris', $_POST['rdv_pris']);
$req -> bindParam(':vente', $_POST['vente']);
$req -> bindParam(':relance', $_POST['relance']);
$req -> bindParam(':origine', $_POST['origine']);
$req -> bindParam(':annulation', $_POST['annulation']);
$req -> bindParam(':details1', $_POST['details1']);
$req -> bindParam(':details2', $_POST['details2']);
$req -> bindParam(':details3', $_POST['details3']);
$req -> bindParam(':details4', $_POST['details4']);
$req -> bindParam(':details5', $_POST['details5']);
$req -> bindParam(':details6', $_POST['details6']);
$req -> bindParam(':date_rdv', $date_rdv);
$req -> bindParam(':date_vente', $date_vente);
$req -> bindParam(':date_relance', $date_relance);
$req -> bindParam(':paiement_esp', $_POST['paiement_esp']);
$req -> execute(); |
Partager