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

39 lines
1.6 KiB
PHP
Executable File

<?php
// -----------------------------------------------------
// init var
// -----------------------------------------------------
$tabIdPrd=array();
$tabRefPrd=array();
$tabLibPrd=array();
$admMsgClass='ok';
// $nbResAff=10;
// if (isset($_GET['borne1'])) {$borne1=$_GET['borne1'];}
// ------------------------------------------------------
// Filtre par limite
// ------------------------------------------------------
$reqPrd="SELECT idPrd, refPrd FROM `produits` order by idPrd;";
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['requete allPrd' => $reqPrd], 'reqAllPrd.php');}
$resConn=$idPdo->query($reqPrd);
if ($resConn) { // si la requête a fonctionnée
if ($resConn->rowCount()>0) { // si la requête a retourné au moins un enregistrement
$i=0;
$admMsgClass='ok';
while ($tableauPrd=$resConn->fetch(PDO::FETCH_ASSOC)) {
$tabIdPrd[$i]=$tableauPrd['idPrd'];
$tabRefPrd[$i]=$tableauPrd['refPrd'];
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['idPrd=' => $tabIdPrd[$i]], '');}
$idPrdRech=$tabIdPrd[$i];
include ("reqSelectPrdLib.php");
$tabLibPrd[$i]=$nomPrd; //TITI
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['libPrd=' => $tabLibPrd[$i],'idPrdRech=' => $idPrdRech], '');}
$i++;
}
}
else
{$admMsg .= "Il est impossible de retrouver les données tout produit. "; $admMsgClass='ko';}
}
else
{$admMsg .= "Nous sommes désolés, les données article ne peuvent pas être affichées. "; $admMsgClass='ko'; }
?>