Welcome Guest, Not a member yet? Register   Sign In
Codeignter querying mssql through odbc
#13

[eluser]kikz4life[/eluser]
hi there flaky,

did what you said
change
Code:
$CI->dbutil =& new $class();

to
Code:
$CI->dbutil = new $class();

after this it gives me this error

Code:
Fatal error: Class 'Dataset_db' not found in C:\xampp\htdocs\comunionSQL\system\application\libraries\Loader.php  on line 343

Dataset_db is my main model and line 343 in loader.php is within this function:

Code:
function model($model, $name = '', $db_conn = FALSE)
    {
        if (is_array($model))
        {
            foreach($model as $babe)
            {
                $this->model($babe);
            }
            return;
        }

        if ($model == '')
        {
            return;
        }

        // Is the model in a sub-folder? If so, parse out the filename and path.
        if (strpos($model, '/') === FALSE)
        {
            $path = '';
        }
        else
        {
            $x = explode('/', $model);
            $model = end($x);
            unset($x[count($x)-1]);
            $path = implode('/', $x).'/';
        }

        if ($name == '')
        {
            $name = $model;
        }

        if (in_array($name, $this->_ci_models, TRUE))
        {
            return;
        }

        $CI =& get_instance();
        if (isset($CI->$name))
        {
            show_error('The model name you are loading is the name of a resource that is already being used: '.$name);
        }

        $model = strtolower($model);

        // {{{ Matchbox

        $module = $this->_matchbox->argument(3);

        if (!$filepath = $this->_matchbox->find('models/' . $path . $model . EXT, $module)) {
            show_error('Unable to locate the model you have specified: ' . $model);
        }

        // }}}

        if ($db_conn !== FALSE AND ! class_exists('CI_DB'))
        {
            if ($db_conn === TRUE)
                $db_conn = '';

            $CI->load->database($db_conn, FALSE, TRUE);
        }

        if ( ! class_exists('Model'))
        {
            load_class('Model', FALSE);
        }

        // {{{ Matchbox

        require_once($filepath);

        // }}}

        $model = ucfirst($model);

        $CI->$name = new $model();  // --> this is line 343, by removing the (&)sign it doesnt read my main model which is Dataset_db
        $CI->$name->_assign_libraries();

        $this->_ci_models[] = $name;
    }
In my previous server it works but now in xampp 1.7.3 my CI application just crash, :down. What do you think is the problem here?


Messages In This Thread
Codeignter querying mssql through odbc - by El Forum - 05-05-2010, 02:57 AM
Codeignter querying mssql through odbc - by El Forum - 05-05-2010, 03:35 AM
Codeignter querying mssql through odbc - by El Forum - 05-05-2010, 04:28 AM
Codeignter querying mssql through odbc - by El Forum - 05-05-2010, 04:37 AM
Codeignter querying mssql through odbc - by El Forum - 05-05-2010, 06:54 PM
Codeignter querying mssql through odbc - by El Forum - 05-05-2010, 11:42 PM
Codeignter querying mssql through odbc - by El Forum - 05-06-2010, 06:37 AM
Codeignter querying mssql through odbc - by El Forum - 05-06-2010, 08:29 AM
Codeignter querying mssql through odbc - by El Forum - 05-06-2010, 07:34 PM
Codeignter querying mssql through odbc - by El Forum - 05-06-2010, 11:38 PM
Codeignter querying mssql through odbc - by El Forum - 05-11-2010, 12:29 AM
Codeignter querying mssql through odbc - by El Forum - 05-12-2010, 03:22 AM
Codeignter querying mssql through odbc - by El Forum - 05-13-2010, 05:24 AM
Codeignter querying mssql through odbc - by El Forum - 05-16-2010, 11:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB