[eluser]whygod[/eluser]
Hi guys
I'm not sure where the problem exactly is.
controller: front.php
Code:
function index() {
//$this->data['header'] = $this->load->view('template/header', $this->data, TRUE);
$this->data['follow_links'] = $this->folio_model->get_follow_links();
$this->data['footer'] = $this->folio_model->read_footer_text();
$this->load->view('template/master', $this->data);
}
model: folio_model
Code:
function get_follow_links()
{
//fetch content of followlinks table and store them into array.
$query = $this->db->select('facebook', 'twitter', 'rss', 'youtube', 'contact')
->where('idfollow', 1)
->get('followlinks');
if($query->num_rows() > 0)
{
return $query->result_array();
}
}
view: master.php
Code:
<?php
echo '<br>';
echo '<pre>';
print_r($follow_links);
echo '</pre>';
echo '<br>';
?>
The problem is it only print only one value,
Code:
Array
(
[0] => Array
(
[facebook] => http://facebook.com
)
)
But the table followlinks has more than values.
It has facebook url, twitter url, rss url, youtube url etc...
Anyone would like to give shed to this?
Thank you very much in advanced.