res = odbc_exec($conn, 'set names utf8');放在插入语句前 不行就把sql打印出来,手动复制到mysql控制台执行,看有什么错
php向mysql中插入utf8格式的中文报错!
$res = odbc_exec($conn, 'set names utf8');
放在插入语句前
不行就把sql打印出来,手动复制到mysql控制台执行,看有什么错2014-11-18
在执行sql之前,设置字符编码
$res = odbc_exec($conn, 'set names utf8');$res = odbc_exec($conn, $str_sql);2014-11-18
你编辑器的编码是utf8吗?2014-11-18
set names utf82014-11-18