Hello,
In one of my controller’s functions i get data from a model via a funtion, and put the data in a string.
$continut = $this->biography->getEntries();
the getEntries() funtion looks like this:
function getEntries(){
$i=0;
$query = $this->db->query("SELECT * FROM biografie ORDER BY data DESC");
foreach ($query->result() as $row){
if ($i % 2 ==0){
$this->continut .='
<div id="bioleft">
<div class="bioheader">
<h1 class="biofloat2">' . $row->titlu . '</h1>
</div>
<div class="rightline2">
<p class="dreapta">' . $row->subtitlu . '</p><br /><br />
<p class="dreapta">' . nl2br($row->continut) . '</p><br />
</div>
</div>
';
$i++;
}else{
$this->continut .='
<div id="bioright">
<div class="bioheader2">
<h1 class="biofloat">' . $row->titlu . '</h1>
</div>
<div class="rightline">
<p class="stanga">' . $row->subtitlu . '</p><br />
<p class="stanga">' . nl2br($row->continut) . '</p> <br />
</div>
</div>
';
$i++;
}
}
return $this->continut;
}
The problem is the folowing:
If I modify my database and just fo to the function via link it dosen’t show what changes i made in the data base, only a refresh can fetch my data corectly.
I am new to codeigniter, and allso i am a bad writer.
Hope u can understand what i ment.
Please HELP!
