回复 10# blue_dvd
你看看我的代码,要是能这样排列数据就好了,存起来方便。
#AutoIt3Wrapper_UseX64=n
#include <SQLite.au3>
#include <array.au3>
;~ #include <SQLite.dll.au3>
Local $aRow, $hQuery, $sOut = '', $sQuery
Local $hDb = @ScriptDir & '\Monitor.db'
_SQLite_Startup()
ConsoleWrite("SQLite 库版本 = " & _SQLite_LibVersion() & @CRLF)
Local $test = _SQLite_Open($hDb) ; 打开 :内存: 数据库
_SQLite_Query($test, "select * from Monitor;", $hQuery) ;查询表中所有数据
;ConsoleWrite(@CRLF & '下面将输出表中所有数据:')
While _SQLite_FetchData($hQuery, $aRow) = $sqlite_ok ;查到有效数据
;行列转置才能用
Local $aArray2[UBound($aRow, 2)][UBound($aRow, 1)]
For $i = 0 To UBound($aRow, 2) - 1
For $j = 0 To UBound($aRow, 1) - 1
$aArray2[$i][$j] = $aRow[$j][$i]
Next
Next
WEnd
_ArrayDisplay($aArray2)
|