Welcome Guest, Not a member yet? Register   Sign In
Autoloading Models PHP 5 Style
#2

[eluser]gcarrion[/eluser]
It is also worth to mention if I change the model from this:
Code:
<?php
class Test_model extends Model {

    function getTest() {
        $query = $this->db->query('select * from table where PostStatus = 1');

        if($query->num_rows() > 0) {

            foreach ($query->result() as $row) {
                $data[] = $row;
            }
        }
        return $data;
    }

}
?>

To this:
Code:
<?php
class Test_model {

    function getTest() {
        $data = array ('test1','test2','test3');
        return $data;
    }

}
?>

To test just output a simple array, It works fine without any errors.

Any idea?


Messages In This Thread
Autoloading Models PHP 5 Style - by El Forum - 12-29-2009, 05:36 PM
Autoloading Models PHP 5 Style - by El Forum - 12-29-2009, 07:49 PM
Autoloading Models PHP 5 Style - by El Forum - 12-29-2009, 08:52 PM
Autoloading Models PHP 5 Style - by El Forum - 12-29-2009, 08:57 PM
Autoloading Models PHP 5 Style - by El Forum - 12-29-2009, 09:17 PM
Autoloading Models PHP 5 Style - by El Forum - 12-30-2009, 12:42 AM
Autoloading Models PHP 5 Style - by El Forum - 12-30-2009, 03:05 AM
Autoloading Models PHP 5 Style - by El Forum - 12-30-2009, 04:39 PM
Autoloading Models PHP 5 Style - by El Forum - 12-31-2009, 06:27 AM
Autoloading Models PHP 5 Style - by El Forum - 01-01-2010, 09:10 AM
Autoloading Models PHP 5 Style - by El Forum - 01-01-2010, 09:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB