alpha_full/admin/catalog/req/reqInsertLibellePrd.php
2026-04-06 22:58:51 +02:00

26 lines
1.2 KiB
PHP
Executable File

<?php
// -----------------------------------------------------
// Requete
// -----------------------------------------------------
if (empty($nomPrd)) $nomPrd='-';
if (isset($nomPrd)) $nomPrd=addslashes($nomPrd);
if (empty($descCourt)) $descCourt='-';
if (!empty($descCourt)) $descCourt=addslashes($descCourt);
if (empty($descLong)) $descLong='-';
if (isset($descLong)) $descLong=addslashes($descLong);
$reqInsert = "INSERT INTO `produitslibelle` (numPrd, idPrd, idLg, nomPrd, descCourt, descLong)";
$reqInsert .= " VALUES (0, " .$idPrd. ", '" .$_SESSION['lgCouranteCode']. "', '" .$nomPrd. "', '" .$descCourt. "', '" .$descLong. "'); ";
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['reqInsertlibellePrd' => $reqInsert, 'reqInsert' => $reqInsert], 'reqInsertLibellePrd.php');}
try{
$resConn=$idPdo->query($reqInsert);
if ($resConn) {$admMsg .= "<br>Libellé article " .$_SESSION['lgCouranteLibelle']. " créé avec succès !"; $admMsgClass='ok'; }
}
catch (PDOException $e ) {
$admMsg .= "Echec de la création du libellé article. " ;
$admMsgClass='ko';
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['reqInsert' => $reqInsert], 'reqInsertLibellePrd.php');}
}
?>