Results 1 to 2 of 2
Oct 23, 2011, 16:08 #1
- Join Date
- Sep 2011
- 0 Post(s)
- 0 Thread(s)
Change database encoding in codeigniter
mysql_query('SET NAMES `utf8`;', $link);
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
Dec 20, 2011, 10:23 #2CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.). The config file is located at application/config/database.php. You can also set database connection values for specific environments by placing database.php it the respective environment config folder.
Place a database.php in your application/config folder and edit the file to suit your needs.