|
发表于 2014-4-10 15:23:12
|
显示全部楼层
Global $db_ip = "222.222.222.222"
Global $db_un = "xxxx"
Global $db_pw = "xxxx"
Global $db_table = "tablename"
_MySQL_InitLibrary()
If @error Then Exit MsgBox(16, "错误", "数据库DLL初始化失败!")
$MySQLConn = _MySQL_Init()
$connected = _MySQL_Real_Connect($MySQLConn, $db_ip, $db_un, $db_pw, $db_table)
If $connected = 0 Then
$MySQLConn = _MySQL_Init()
$connected = _MySQL_Real_Connect($MySQLConn, $db_ip, $db_un, $db_pw, $db_table)
If $connected = 0 Then Exit MsgBox(16, "错误", _MySQL_Error($MySQLConn))
EndIf
_MySQL_Real_Query($MySQLConn, "SELECT * FROM table")
一直这么用,网络的也没问题。 |
|