本文整理匯總了PHP中dao::connexion方法的典型用法代碼示例。如果您正苦於以下問題:PHP dao::connexion方法的具體用法?PHP dao::connexion怎麽用?PHP dao::connexion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dao
的用法示例。
在下文中一共展示了dao::connexion方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: afficheEchiquier
function afficheEchiquier()
{
//Affichage en html, tableau
$dao = new dao();
$dao->connexion();
$cmp = 0;
//for($l = 0; $l < sizeof($this -> Entreprises); $l++) {
foreach ($this->Entreprises as $IDent) {
for ($e = 1; $e <= $this->LiensEntrCren[$IDent][0]; $e++) {
for ($c = 0; $c < $this->nbCreneaux; $c++) {
$Etu = $this->Echiquier[$this->LiensEntrCren[$IDent][$e]][$c];
if ($Etu != 0) {
// nom de l'etudiant
$dao->ajoutCreneau($c, $this->Formations[$cmp], $this->Etudiants[$Etu]);
}
}
$cmp++;
}
}
$dao->deconnexion();
}
示例2: generateFormation
public static function generateFormation()
{
$dao = new dao();
$dao->connexion();
$listeEnt = $dao->getEntreprises();
$tabConfig = $dao->getConfiguration();
$dao->deconnexion();
foreach ($listeEnt as $entr) {
$formation = new formation($entr["IDEnt"], $entr["formationsRecherchees"], $entr["nbStands"], $entr["typeCreneau"], $tabConfig["nbCreneauxMatin"], $tabConfig["nbCreneauxAprem"]);
$formation->createForm();
}
}
示例3: dao
<?php
require 'modele/algo.php';
require 'modele/dao/dao.php';
$dao = new dao();
$dao->supprimerCreneau();
$dao->connexion();
$arrayNbCreneaux = $dao->getNbCreneaux();
$creneauMatin = $arrayNbCreneaux[0];
$creneauAprem = $arrayNbCreneaux[1];
$nbCreneaux = $creneauMatin + $creneauAprem;
$Etudiants = array();
$Choix = array();
$Entreprises = array();
$Creneaux = array();
$LiensEntrCren = array();
$Formations = array();
$listeEtu = $dao->getEtudiants("Informatique");
//On s'occupe de $Etudiants
$cmp = 0;
foreach ($listeEtu as $etu) {
$Etudiants[$cmp + 1] = $etu["IDEtu"];
$Choix[] = explode(",", $etu["listeChoixEtu"]);
$cmp++;
}
//On s'occupe de $Entreprises, $Creneaux et $LiensEntrCren
$listeEnt = $dao->getEntreprises();
foreach ($listeEnt as $ent) {
$Entreprises[] = $ent["IDEnt"];
}
$listeFormation = $dao->getFormations("Informatique");