1,5 → 1,5 |
<? |
|
<?php |
|
class macroElement implements iMacroElement{ |
|
protected $identifiantblockdedonnees; |
9,20 → 9,18 |
protected $collectionblockdedonnees; |
protected $idRes; |
|
function __construct($aConn,$aParentDataBlock,$identifiant) |
{ |
$this->connexion = $aConn; |
function __construct($aConn,$aParentDataBlock,$identifiant) |
{ |
$this->connexion = $aConn; |
$this->blockdedonneesParent = $aParentDataBlock; |
$this->identifiantblockdedonnees = $identifiant; |
$this->contexteRef = $this->blockdedonneesParent->recupererDonnees(); |
} |
|
|
} |
|
function construire() |
{ |
{ |
$sql=$this->getSQL(); |
if(!is_NULL($sql)) |
{ |
if(!is_NULL($sql)) { |
$this->openCursor($sql); |
while ($this->fetch()); |
$this->closeCursor(); |
40,30 → 38,27 |
|
function contruireparrecursivite() |
{ |
|
|
} |
|
|
function openCursor($sql) |
{ |
$res = mysql_query($sql,$this->connexion); |
if (!$res) echo mysql_errno() . ": " . mysql_error() . "\n"; |
$this->idRes= $res; |
$res = mysql_query($sql, $this->connexion); |
if (!$res) echo mysql_errno().': '.mysql_error()."\n"; |
$this->idRes = $res; |
$this->collectionblockdedonnees = new collectionblockdedonnees($this->identifiantblockdedonnees); |
$this->blockdedonneesParent->ajouterCollectionBlockFils($this->collectionblockdedonnees); |
} |
|
function fetch() |
{ |
{ |
$res=mysql_fetch_assoc($this->idRes); |
if (!$res) |
{} |
else |
{ |
if (!$res) { |
|
} else { |
//$this->blockdedonnees = new blockdedonnees($this->identifiantblockdedonnees); |
//$this->blockdedonnees->affecterDonnees($res); |
$this->collectionblockdedonnees->ajouterDonnees($res); |
|
$this->collectionblockdedonnees->ajouterDonnees($res); |
} |
return $res; |
} |
72,9 → 67,5 |
{ |
mysql_free_result($this->idRes); |
} |
|
|
|
} |
|
?> |