Welcome Guest, Not a member yet? Register   Sign In
Loading Models
#6

[eluser]rob897[/eluser]
So then with this controller
Code:
<?php
class DBS extends Controller {

    function DBS()
    {
        parent::Controller();
        $this->load->model('dbs_model');
        $this->load->model('account_model');
        $this->load->model('hosting_model');
    }

    function Edit()
    {
        $this->dbs_model->Edit();
    }

    function Delete()
    {
        $this->dbs_model->Delete();
    }

    function Create()
    {
        $this->dbs_model->Create();
    }

    function Backup()
    {
        $this->dbs_model->Backup($database='',$domain='',$uid='');
    }

    function Update()
    {
        $this->dbs_model->Update();
    }
}

Within the "accounts_model" class there are functions that return account information, I think I am accessing these directly from the model and not the controller so for instance, I have in the dbs_model something that returns:
Code:
$this->account_model->SearchAccounts($domain);
Should I be getting this info from the controller instead....? I think this is where my problems are.


Messages In This Thread
Loading Models - by El Forum - 10-24-2008, 12:48 PM
Loading Models - by El Forum - 10-27-2008, 08:27 AM
Loading Models - by El Forum - 10-27-2008, 08:43 AM
Loading Models - by El Forum - 10-27-2008, 09:11 AM
Loading Models - by El Forum - 10-27-2008, 09:21 AM
Loading Models - by El Forum - 10-27-2008, 09:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB