Welcome Guest, Not a member yet? Register   Sign In
Setting charset and collation on every query, is it neccessary and can I suppress it?
#2

[eluser]InsiteFX[/eluser]
MySQL will handle it for you if you create your databse and tables like this:
Code:
DROP TABLE IF EXISTS `ci_sessions`;

CREATE TABLE IF NOT EXISTS `ci_sessions` (
  `session_id`    varchar(40)          DEFAULT '0' NOT NULL,
  `ip_address`    varchar(16)          DEFAULT '0' NOT NULL,
  `user_agent`    varchar(50)                      NOT NULL,
  `last_activity` int(10)     unsigned DEFAULT 0   NOT NULL,
  `user_data`     text                             NOT NULL,
  PRIMARY KEY (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; COMMENT <-- This is the collation settings

When you create a new database in phpMyAdmin click on the Operations tab and at the bottom you will see the collation setting it defaults to lantin1_swedish_ci change it utf8_uncode_ci

InsiteFX


Messages In This Thread
Setting charset and collation on every query, is it neccessary and can I suppress it? - by El Forum - 03-25-2011, 10:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB