- Hostname
- Username
- Password
- Database
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'mypassword',
'database' => 'datingSite',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
or you can also write like this
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'mypass';
$db['default']['database'] = 'datingSite';
Simple and easy to connect with database. For your information, you can connect multiple databases in one project application system. Like one database of "Employees" and other databases of "Passports," these two separate databases can be used at a time in one application system in software development process and it is a legal way, You can use it like this. If you have any problem you can ask here in the comment box We will response you. For further reading, you can read the pagination that is the next step.
How to create pagination in Codeigniter...!
This Post Was Last Updated On September 30, 2016, By Author: Mahira Khan.
0 comments:
Post a Comment