Ticket #97: patchMysqlCharset.diff

File patchMysqlCharset.diff, 0.7 kB (added by sylvain261, 8 months ago)

SET NAMES à la place de SET CHARACTER SET

  • mysql.dbconnection.php

    old new  
    7676      if($cnx = @$funcconnect ($this->profil['host'], $this->profil['user'], $this->profil['password'])){ 
    7777         if(isset($this->profil['force_encoding']) && $this->profil['force_encoding'] == true 
    7878            && isset($this->_charsets[$GLOBALS['gJConfig']->charset])){ 
    79              mysql_query("SET CHARACTER SET '".$this->_charsets[$GLOBALS['gJConfig']->charset]."'", $cnx); 
     79             mysql_query("SET NAMES '".$this->_charsets[$GLOBALS['gJConfig']->charset]."'", $cnx); 
    8080         } 
    8181         return $cnx; 
    8282      }else{ 
Download in other formats: Original Format