62 lines
2.5 KiB
PHP
Executable File
62 lines
2.5 KiB
PHP
Executable File
<?php
|
|
// $nomFicAppelant = basename(__FILE__);
|
|
$resConn='';
|
|
|
|
$tableIdPrd=array();
|
|
$tableImgPt=array();
|
|
$tableImgGrd=array();
|
|
$tablePrix=array();
|
|
$tablePrixTtc=array();
|
|
$tableStock=array();
|
|
$afficheGond=array();
|
|
$afficheGond=array();
|
|
$tableLibLong=array();
|
|
$tabNewPrd=array();
|
|
|
|
// ---------------------------------------------------
|
|
// Trouver max des gondoles tournantes
|
|
// ---------------------------------------------------
|
|
$reqSelectGT="SELECT max(afficheGond) as maxGond from `produits` WHERE gondole=1 and statusPrd=1;";
|
|
// if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['reqSelectGT:' => $reqSelectGT ], 'gondole_fetch.php');}
|
|
$resConnGT='';
|
|
$resConnGT=$idPdo->query($reqSelectGT);
|
|
$result=$resConnGT->fetch(PDO::FETCH_ASSOC);
|
|
$maxGond=$result['maxGond'];
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['reqSelectGT' => $reqSelectGT, 'maxGond afficheGond ' => $maxGond ], 'gondole_fetch.php');}
|
|
|
|
// ---------------------------------------------------
|
|
// requete dans gondole.reqSelect
|
|
// ---------------------------------------------------
|
|
|
|
$resConn=$idPdo->query($reqSelect);
|
|
$i=0;
|
|
try {
|
|
if ($resConn) {
|
|
// if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2,['reqSelect ' => $reqSelect], 'gondole_fetch'); }
|
|
while ($resTabPrd=$resConn->fetch(PDO::FETCH_ASSOC)) {
|
|
$tableIdPrd[$i]=$resTabPrd['idPrd'];
|
|
$tableImgPt[$i]=$resTabPrd['lienImagePt'];
|
|
$tableImgGrd[$i]=$resTabPrd['lienImageGd'];
|
|
$tablePromo[$i]=$resTabPrd['promo'];
|
|
$tablePrix[$i]=$resTabPrd['prixHt'];
|
|
$tablePrixTtc[$i]=$resTabPrd['prixTtc'];
|
|
$tableStock[$i]=$resTabPrd['stock'];
|
|
$afficheGond[$i]=$resTabPrd['afficheGond'];
|
|
$tabNewPrd[$i]=$resTabPrd['new'];
|
|
$tableLibNomPrd[$i]=$resTabPrd['nomPrd'];
|
|
$tableLibDesc[$i]=stripslashes($resTabPrd['descCourt']);
|
|
$tableLibLong[$i]=stripslashes($resTabPrd['descLong']);
|
|
|
|
// si recherche defaut, produit ou nom produit : on update le N° pour les faire tourner
|
|
if ( $typeDeRecherche==1 ) {include ("gondole_tournantes.update.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') {include ("gondole_liste.debug.php");}
|
|
$i++;
|
|
}
|
|
}
|
|
}
|
|
catch (PDOException $e) {
|
|
// error
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['reqSelect' => $reqSelect], '');}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Your fail message:' => $e->getMessage()], 'gondole.fetch');}
|
|
}
|
|
?>
|