Welcome Guest, Not a member yet? Register   Sign In
Database Forge Class - Set Default Collation
#1

Is there a way to set the default collation using Codeigniter's Database Forge Class? It defaults to 'utf8_general_ci' but I want to override that to 'utf8_unicode_ci'.
Code:
$attributes = array(
 'ENGINE' => 'InnoDB',
 'COLLATION' => 'utf8_unicode_ci'
);
$this->dbforge->create_table(table_name, FALSE, $attributes);
When I add this (my best guess on how to set it) it produces an error.
Code:
'COLLATION' => 'utf8_unicode_ci'
Documentation does not specify how to set the default collation.
Reply
#2

The default collation is set in the ,/application/config/database.php configuration file.

Also when you create the database it ask you for the collation.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB