if(mysqli_num_rows($res_mef)>0) { while($lig_mef=mysqli_fetch_object($res_mef)) { $tab_mef[$lig_mef->mef_code]["libelle_court"]=$lig_mef->libelle_court; $tab_mef[$lig_mef->mef_code]["libelle_long"]=$lig_mef->libelle_long; $tab_mef[$lig_mef->mef_code]["libelle_edition"]=$lig_mef->libelle_edition; $tab_mef[$lig_mef->mef_code]["code_mefstat"]=$lig_mef->code_mefstat; $tab_mef[$lig_mef->mef_code]["mef_rattachement"]=$lig_mef->mef_rattachement; } } $mef_collection = new PropelCollection(); $mef_collection = MefQuery::create()->find(); foreach ($mef_collection as $mef) { ?> <tr> <td><?php echo $mef->getId(); ?></td> <td><?php // On récupère un truc bizarre //echo $mef->getMefCode(); $sql="SELECT * FROM mef WHERE id='".$mef->getId()."';"; $res_mef_courant=mysqli_query($GLOBALS["mysqli"], $sql); if(mysqli_num_rows($res_mef_courant)>0) { echo old_mysql_result($res_mef_courant,0,"mef_code"); } else { echo "???"; } ?></td> <td><?php echo $mef->getLibelleCourt(); ?></td> <td><?php echo $mef->getLibelleLong(); ?></td> <td><?php echo $mef->getLibelleEdition(); ?></td>
/** * Exclude object from result * * @param Mef $mef Object to remove from the list of results * * @return MefQuery The current query, for fluid interface */ public function prune($mef = null) { if ($mef) { $this->addUsingAlias(MefPeer::ID, $mef->getId(), Criteria::NOT_EQUAL); } return $this; }