mysql5.6.6이상에서 sql_mode 설정 코드 추가

This commit is contained in:
chicpro
2013-11-05 09:23:43 +09:00
parent 2bbbfe4553
commit 0edefbe3f9
2 changed files with 10 additions and 3 deletions

View File

@ -95,6 +95,7 @@ if (file_exists($dbconfig_file)) {
$connect_db = sql_connect(G5_MYSQL_HOST, G5_MYSQL_USER, G5_MYSQL_PASSWORD) or die('MySQL Connect Error!!!');
$select_db = sql_select_db(G5_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
@mysql_query(" set names utf8 ");
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) @mysql_query("SET SESSION sql_mode = ''");
if (defined(G5_TIMEZONE)) @mysql_query(" set time_zone = '".G5_TIMEZONE."'");
} else {
?>