我有这样的代码: class one{
public $instance;
function instance(){
$this->instance = 'instance was created';
}
function execute(){
$this->instance .= "and something happened"
我试图确保我充分利用了我的模型类,并且我最近刚刚接触MVC中的M。假设在你的模型中存在这样的函数: public function by_year($year)
{
$this->db->where('EXTRACT(YEAR FROM post_date) = '.$year);
}
public function by_month($month)
{
$this-