24 lines
1.1 KiB
PHP
Executable File
24 lines
1.1 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
$result=array();
|
|
|
|
// ---------------------------------------------------
|
|
// Maj des gondoles tournantes
|
|
// ---------------------------------------------------
|
|
// if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['maxGond GT' => $maxGond, 'afficheGond[i]' => $afficheGond[$i] ], 'gondole_tournantes.update');}
|
|
$gond = filter_var($afficheGond[$i], FILTER_VALIDATE_INT);
|
|
$max = filter_var($maxGond, FILTER_VALIDATE_INT);
|
|
|
|
if ($gond !== false && $max !== false ) {
|
|
$afficheCompteur = $gond + 1;
|
|
if ($afficheCompteur > $max) $afficheCompteur = 1;
|
|
|
|
// ---------------------------------------------------
|
|
// Requete
|
|
// ---------------------------------------------------
|
|
$reqUpdate="UPDATE produits SET afficheGond=" .$afficheCompteur. " WHERE idPrd=" .$tableIdPrd[$i]. ";";
|
|
$resConnGT='';
|
|
$resConnGT=$idPdo->query($reqUpdate);
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['reqUpdate GT' => $reqUpdate ], 'gondole_tournantes.update');}
|
|
}
|
|
?>
|