[eluser]ytsejam[/eluser]
This is my services_model
Code:
class Services_model extends CI_Model {
function getAll() {
$q = $this->db->get('services');
if($q->num_rows() > 0){
foreach ($q->result() as $row)
{
$data[] = $row;
}
return $data;
}
}
When I use pre code for the about model. I cant get no answer for the infos. But if I use $records value , It shows me services table.
This is my last edit in thethe about_model It was supposed to load the table abouts. but I think there is an error:
Code:
public function view($page = 'about')
{
$this->load->model('about_model');
$this->load->helper('text');
$this->data['infos']= $this->about_model->getAll();
if ( ! file_exists('application/views/pages/'.$page.'.php'))
{
// Whoops, we don't have a page for that!
show_404();
}
$data['title'] = ucfirst($page); // Capitalize the first letter
$this->render_page('pages/'.$page,$data);
[code]