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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| if (!isset($_POST['fil'])) {$_POST['fil']=0 ; }
if (!isset($_POST['siege'])) {$_POST['siege']=0 ; }
if (!isset($_POST['info'])) {$_POST['info']=0 ; }
if (!isset($_POST['mere'])) {$_POST['mere']=0 ; }
if (!isset($_POST['effst'])) {$_POST['effst']=0 ; }
if ($_POST['steid'] !='') {
try
{
$sql = 'UPDATE ste SET
Ste_RS = :rs,
Ste_Enseigne = :ens,
Ste_Ville = :ville,
Ste_CP = :cp,
Ste_Activite = :act,
Ste_Status = :sta ,
ZNE_IdZone = :zone,
Ste_Ad1 = :ad1,
Ste_Ad2 = :ad2,
Ste_Ad3 = :ad3,
Ste_Siret = :siret,
NAF_Id = :naf ;
Ste_Effectif = :eff,
Ste_EffecEstim = :effest,
Ste_filliale = :fil,
Ste_Siege = :siege ,
Ste_PosteEstime = :pes,
Ste_AnneeCrea = :annee,
Ste_InfoInterne = :info,
Ste_KM = :km,
Ste_IdMere = :mere,
Ste_CA = :ca,
Ste_Pays = :pays,
Ste_Desc = :desc,
Cef_Lib = :tsa,
Ste_Site = :web
where Ste_Id = :id ;' ;
$s = $pdo->prepare($sql);
$s->bindValue(':rs', $_POST['rs'],PDO::PARAM_INT);
$s->bindValue(':ens', $_POST['enseigne'],PDO::PARAM_STR);
$s->bindValue(':ville', $_POST['ville'],PDO::PARAM_STR);
$s->bindValue(':cp', $_POST['cp'],PDO::PARAM_INT);
$s->bindValue(':act', $_POST['activite'],PDO::PARAM_STR);
$s->bindValue(':sta', $_POST['status'],PDO::PARAM_STR);
$s->bindValue(':zone', $_POST['zone'],PDO::PARAM_STR);
$s->bindValue(':ad1', $_POST['ad1'],PDO::PARAM_STR);
$s->bindValue(':ad2', $_POST['ad2'],PDO::PARAM_STR);
$s->bindValue(':ad3', $_POST['ad3'],PDO::PARAM_STR);
$s->bindValue(':siret', $_POST['siret'],PDO::PARAM_STR);
$s->bindValue(':naf', $_POST['naf'],PDO::PARAM_STR);
$s->bindValue(':eff', $_POST['eff'],PDO::PARAM_INT);
$s->bindValue(':effest', $_POST['effst'],PDO::PARAM_INT);
$s->bindValue(':fil', $_POST['fil'],PDO::PARAM_INT);
$s->bindValue(':siege', $_POST['siege'],PDO::PARAM_INT);
$s->bindValue(':pes', $_POST['pes'],PDO::PARAM_INT);
$s->bindValue(':annee', $_POST['annee'],PDO::PARAM_INT);
$s->bindValue(':info', $_POST['info'],PDO::PARAM_INT);
$s->bindValue(':km', $_POST['km'],PDO::PARAM_INT);
$s->bindValue(':mere', $_POST['mere'],PDO::PARAM_INT);
$s->bindValue(':ca', $_POST['ca'],PDO::PARAM_INT);
$s->bindValue(':pays', $_POST['pays'],PDO::PARAM_STR);
$s->bindValue(':desc', $_POST['desc'],PDO::PARAM_STR);
$s->bindValue(':tsa', $_POST['tsa'],PDO::PARAM_STR);
$s->bindValue(':web', $_POST['web'],PDO::PARAM_STR);
$s->bindValue(':id', $_POST['steid'],PDO::PARAM_INT);
$s->execute();
/* $result = $s->fetchall();
print_r($result); */
print_r($_POST);
$s->closeCursor(); |
Partager