|
[code]
#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
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|