22 lines
1.0 KiB
PHP
Executable File
22 lines
1.0 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
$trouve=false;
|
|
$resConn='';
|
|
$result='';
|
|
$reqSelect="Select max(id) as mxId FROM `thmParam`;";
|
|
$resConn=$idPdo->query( $reqSelect);
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['reqSelect' => $reqSelect ],'parametres.reqInsert.php');}
|
|
if ($resConn) {
|
|
$result=$resConn->fetch(PDO::FETCH_ASSOC);
|
|
$nextIDItem=$result['mxId'];
|
|
$nextIDItem=$nextIDItem+1;
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['max item' => $nextIDItem ],'');}
|
|
}
|
|
|
|
$reqInsert="INSERT INTO `thmParam` (id, desc, va, idTheme) values (" .$nextIDItem. ",'" .$param. "','" .$valeur. "', " .$_SESSION['idTheme']. " )";
|
|
$resConn=$idPdo->query($reqInsert);
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['reqInsert' => $reqInsert], '');}
|
|
|
|
if ($resConn) {$admMsg .= " Création du paramètre " .$param. " effectuée avec succès !"; $admMsgClass='ok';}
|
|
else {$admMsg .= " Echec du paramètre " .$param; $admMsgClass='ko';}
|
|
?>
|