• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MY_Model construct not working?!?

#1
[eluser]fatnic[/eluser]
Trying to run this bit of code (just to test) and having problems with $this->table_name.

Code:
class MY_Model extends Model {

    var $table_name;

    function MY_Model() {
        parent::Model();
        $this->table_name = 'whatever';
    }

    function getAll() {
        return $this->table_name;
    }

}
When I call getAll() the above code returns nothing. However, when I set the table name in the getAll() function it work perfectly. What am I doing wrong?!?!?


Messages In This Thread
MY_Model construct not working?!? - by El Forum - 12-01-2008, 10:56 AM
MY_Model construct not working?!? - by El Forum - 12-01-2008, 11:37 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.