CodeIgniter Forums
loading model result error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: loading model result error (/showthread.php?tid=38805)

Pages: 1 2


loading model result error - El Forum - 02-19-2011

[eluser]roothacker[/eluser]
[quote author="mariuskmc" date="1298138012"]must have <?php in model[/quote]
its there
Code:
<?php
class site extends CI_Controller
{
    function index()
    {
        $this->load->model('Site_model');
        $this->load->view('home');
    }
    function about()
    {
        $this->load->view('about');
    }
}



loading model result error - El Forum - 02-19-2011

[eluser]mariuskmc[/eluser]
<?php

what you sent was not.
Was <php

Smile in model


loading model result error - El Forum - 02-19-2011

[eluser]roothacker[/eluser]
[quote author="mariuskmc" date="1298138697"]&lt;?php

what you sent was not.
Was <php[/quote]

copy paste problem sorry for that I have also uploaded my code at http://www.box.net/shared/xnejcl0oxo please check


loading model result error - El Forum - 02-19-2011

[eluser]mariuskmc[/eluser]
Code:
<php
class Site_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    function GetAll()
    {
        $query = $this->db->get('test', 10);
        return $query->result();
    }
}

?&gt;

IN MODEL CHANGE <php to &lt;?php


loading model result error - El Forum - 02-19-2011

[eluser]roothacker[/eluser]
error gone thanks mariuskmc


loading model result error - El Forum - 02-19-2011

[eluser]mariuskmc[/eluser]
with pleasure