MINOR: Bugfix to previous commit.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80233 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-27 13:36:01 +00:00
parent 96250e0136
commit 43abccf15d

View File

@ -38,7 +38,7 @@ class MySQLDatabase extends Database {
* safe will be corrupted. As such, the installer comes with this set in mysite/_config.php by
* default in versions 2.4.0 and later.
*/
public static set_connection_charset($charset = 'utf8') {
public static function set_connection_charset($charset = 'utf8') {
self::$connection_charset = $charset;
}
@ -54,7 +54,7 @@ class MySQLDatabase extends Database {
$this->dbConn = mysql_connect($parameters['server'], $parameters['username'], $parameters['password']);
if(self::$connection_charset) {
$this->query("SET CHARACTER SET '" . self::$connection_charset "'");
$this->query("SET CHARACTER SET '" . self::$connection_charset . "'");
$this->query("SET NAMES '" . self::$connection_charset . "'");
}