You have specified an invalid database connection group codeigniter error You have specified an invalid database connection group codeigniter error codeigniter codeigniter

You have specified an invalid database connection group codeigniter error


You are loading a database group called circrud. But there are no database group called that. The only one you have is a group called default which will be loaded by default if you don't specify a group.

$this->load->database('cicrud');

You should just do

$this->load->database(); in this part of the code:

class Users_model extends CI_Model {function __construct(){parent::__construct();$this->load->database();}


You are already using database group "cicrud" in your database connection here:

$this->load->database('cicrud');

So you can change it to:

$this->load->database();

Or you can change your config to this:

$db['cicrud']['hostname'] = 'localhost';$db['cicrud']['username'] = 'root';$db['cicrud']['password'] = '';$db['cicrud']['database'] = 'cicrud';$db['cicrud']['dbdriver'] = 'mysql';$db['cicrud']['dbprefix'] = '';$db['cicrud']['pconnect'] = TRUE;$db['cicrud']['db_debug'] = TRUE;$db['cicrud']['cache_on'] = FALSE;$db['cicrud']['cachedir'] = '';$db['cicrud']['char_set'] = 'utf8';$db['cicrud']['dbcollat'] = 'utf8_general_ci';$db['cicrud']['swap_pre'] = '';$db['cicrud']['autoinit'] = TRUE;$db['cicrud']['stricton'] = FALSE;

See what is better for you.


$autoload['libraries'] = array('database','session');

add this in config/autoload.phpthen

$this->load->database('databasename');

add this in model