• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Model does weird(solved)

#3
[eluser]Yash[/eluser]
You can't directly use model like this.or I've not tried Sad

anyways

MY_Model.php
Code:
<?php
class BaseModel extends Model {
    function __construct(){
        parent::__construct();
    }

        //Your code here
}
?>

class Post extends BaseModel {
   //Your code here
}

or
Code:
class Post extends Model {
  ststic function doit(){
    return '123';
  }
  
  function get_123(){
    return self::doit();
  }
}
thanx to Sam Dark for code


Messages In This Thread
Model does weird(solved) - by El Forum - 06-25-2008, 01:28 AM
Model does weird(solved) - by El Forum - 06-25-2008, 01:36 AM
Model does weird(solved) - by El Forum - 06-25-2008, 01:40 AM
Model does weird(solved) - by El Forum - 06-25-2008, 01:41 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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