Welcome Guest, Not a member yet? Register   Sign In
Autoload model with a different object name
#8

[eluser]RJ[/eluser]
This is the method in my main controller calling the deal model and passing $dealer from the uri. Not passing right for some reason

Code:
function device($dealer = '999')
    {
        $this->benchmark->mark('code_start');
        // start benchmarking

            $this->dealer($dealer);   // passes db info to dealer library for processing
            $this->dealer->dealer($dealer); // tried this as well

This is my dealer_model:
Code:
class Dealer_model extends Model {

    var $dealer    =    "";
    var $vars    =    "";
    
#--------------------------------------------------------------------------
# Controller
#--------------------------------------------------------------------------
    function Dealer_model($dealer)
    {
        // Call the Model constructor
        parent::Model;

        print_r($dealer);
        // submit log entry
        log_message('debug', "Dealer Class Initialized");
        // on screen php error display
        ini_set('display_errors', 1);
        // use dealer var to grab info from db, set $vars
        $this->vars = $this->grab_vars($dealer);
        // add dealer info to session
        $this->session->set_userdata('dealer',$this->vars);        
        // submit log entry
        log_message('debug', "Dealer routines successfully run");
    }


Messages In This Thread
Autoload model with a different object name - by El Forum - 04-07-2009, 07:05 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 08:32 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 08:38 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 08:54 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 08:59 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 09:45 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 09:50 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 09:52 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 10:10 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 10:11 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 10:52 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 11:04 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 11:19 AM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:16 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:19 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:19 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:21 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:39 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:44 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 12:52 PM
Autoload model with a different object name - by El Forum - 04-07-2009, 01:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB