mysql 插入中文插入不进去 是怎么回事啊
#include <array.au3>
#include "mysql.au3"
_MySQL_InitLibrary()
If @error Then Exit MsgBox(0, '', "could nit init MySQL")
$MysqlConn = _MySQL_Init() ;Եʼۯ
$connected = _MySQL_Real_Connect($MysqlConn, "localhost", "root", "admin", "360cx") ;lޓ˽ߝࠢì
If $connected = 0 Then Exit MsgBox(16, 'Connection Error', _MySQL_Error($MysqlConn))
_MySql_Query($MysqlConn,"SET NAMES UTF8");
;*******************ݨb˽ߝࠢ;********************
$query = "INSERT INTO `360cx`.`money` (`user` ,`password` ,`yesterday` ,`month` ,`id`)VALUES ('按错', '的啊啊', '萨达', '按到啊', '8')";ݨb˽ߝࠢ
$mysql_bool = _MySQL_Real_Query($MysqlConn, $query)
If $mysql_bool = $MYSQL_SUCCESS Then
MsgBox(0, '', "Query OK")
Else
$errno = _MySQL_errno($MysqlConn)
MsgBox(0,"Error:",$errno & @LF & _MySQL_error($MysqlConn))
EndIf
$res = _MySQL_Store_Result($MysqlConn);݇¼өѯܘ4քޡڻ
$fields = _MySQL_Num_Fields($res);8λ˽ܘѨԃר
$mysqlrow2 = _MySQL_Fetch_Row($res,$fields)
MsgBox("","",$mysqlrow2)
$rows = _MySQL_Num_Rows($res);؊Ҋ˽ܘѨԃר
MsgBox(0, "Ҋ˽-؊8λ","Ҋ˽:"&$rows & "-" & $fields&"8λ")
MsgBox(0, '', "өѯչʾ 1- ˖٤ˤɫһٶ8λһٶ8λׁȡ")
Dim $array[$rows][$fields]
For $k = 1 To $rows
没有吗自己帮忙订下 回复 2# ak47gglllk
可以提供MYSQL 上面的資料欄位型態嗎?? 标点符号错了,输入标点符号时,要注意输入法的全角(半角)状态! 很明显啊,提示你语法输错了,标点输出了,不关au3的问题 你的编辑器不提示这个?
页:
[1]