24 lines
933 B
PHP
Executable File
24 lines
933 B
PHP
Executable File
<?php
|
|
$idEtat = $idVal;
|
|
$libEtat = $idLib;
|
|
$lgCourante = $_SESSION['lgCouranteCode'] ?? '';
|
|
$reqInsert = "INSERT INTO libelleetatsprd (numEtat, idEtat, idLg, libelle) VALUES (:numEtat, :idEtat, :idLg, :libelle)";
|
|
$stmt = $idPdo->prepare($reqInsert);
|
|
$params = [
|
|
':numEtat' => 0,
|
|
':idEtat' => $idEtat,
|
|
':idLg' => $lgCourante,
|
|
':libelle' => $libEtat
|
|
];
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug (2, ['reqInsert' => $reqInsert], 'reqInsertEtatPrd.php');}
|
|
$resConn = $stmt->execute($params);
|
|
if ($resConn) {
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Création de l' => ''], '');}
|
|
$admMsgClass = 'ok';
|
|
} else {
|
|
$errorInfo = $stmt->errorInfo();
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Échec de la création de l' => '', 'errorInfo[2]' => $errorInfo[2]], '');}
|
|
$admMsgClass = 'ko';
|
|
$erreurSQL=1;
|
|
}
|
|
?>
|