Welcome Guest, Not a member yet? Register   Sign In
dbutils confusion
#5

[eluser]spyro[/eluser]
I got a little further in the set_server method. I added the TRUE param to the load->database method which fixed my initial connection issue. Now the problem has moved to the next line. Loading dbutils still returns null.

Code:
function set_server($type, $username, $password, $hostname, $port, $database)
    {
        
        $CI =& get_instance();
        
        if($type == 'mysql' || $type == 'mssql')
        {
        
            
            $config['hostname'] = $hostname;
            $config['username'] = $username;
            $config['password'] = $password;
            $config['database'] = "information_schema";
            $config['dbdriver'] = $type;
            $config['dbprefix'] = "";
            $config['pconnect'] = FALSE;
            $config['db_debug'] = TRUE;
            $config['cache_on'] = FALSE;
            $config['cachedir'] = "";
            $config['char_set'] = "utf8";
            $config['dbcollat'] = "utf8_general_ci";
        
            $db = $CI->load->database($config,TRUE);
            
            $util = $CI->load->dbutil();
        
            $this->db_type = $type;
        
        }
        
    }


Messages In This Thread
dbutils confusion - by El Forum - 02-26-2009, 01:21 PM
dbutils confusion - by El Forum - 02-26-2009, 06:51 PM
dbutils confusion - by El Forum - 02-26-2009, 07:58 PM
dbutils confusion - by El Forum - 02-27-2009, 08:35 PM
dbutils confusion - by El Forum - 03-04-2009, 09:04 AM
dbutils confusion - by El Forum - 03-04-2009, 09:18 AM
dbutils confusion - by El Forum - 03-04-2009, 09:26 AM
dbutils confusion - by El Forum - 03-04-2009, 10:15 AM
dbutils confusion - by El Forum - 03-04-2009, 10:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB