找回密码
 加入
搜索
查看: 2486|回复: 3

[AU3基础] 以下SQL 语句如果在AU3 中正确执行

[复制链接]
发表于 2010-10-8 16:57:01 | 显示全部楼层 |阅读模式
$RS.Open("SELECT * FROM tLogs WHERE sCardID = '510107198508214218' GROUP BY sCardID, sCom, cReceived, cRemainBefore, cRemainAfter, dtTime2, iLength ORDER BY dtTime2 DESC" )

评分

参与人数 1金钱 -10 收起 理由
afan -10 错别字

查看全部评分

 楼主| 发表于 2010-10-8 16:57:31 | 显示全部楼层
SELECT sCardID AS 会员卡, sCom AS 机器名, dtTime2 AS 下机时间,
      iLength AS [总上机时(分钟)], cReceived AS 实际消费, cRemainBefore AS 原余额,
      cRemainAfter AS 现余额
FROM tLogs
WHERE (sCardID = '510107198508214218')
GROUP BY sCardID, sCom, cReceived, cRemainBefore, cRemainAfter, dtTime2,
      iLength
ORDER BY dtTime2 DESC

这是原SQL 语句
发表于 2010-10-8 23:13:46 | 显示全部楼层
select * 有问题,select 要跟group by 一致才行
发表于 2010-10-9 08:44:39 | 显示全部楼层
$path = "数据库路径"
$a = "tLogs"
$b = "510107198508214218"
_SQLite_Open($path)
_SQLite_Query(-1, "SELECT * FROM " & $a & " where sCardID ='" & $b & "';", $hQuery)
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
        _GUICtrlListView_AddItem($ListView2, $aRow[0])
        _GUICtrlListView_AddSubItem($ListView2, _GUICtrlListView_FindInText($ListView2, $aRow[0]), $aRow[1], 1)
        _GUICtrlListView_AddSubItem($ListView2, _GUICtrlListView_FindInText($ListView2, $aRow[0]), $aRow[2], 2)
        _GUICtrlListView_AddSubItem($ListView2, _GUICtrlListView_FindInText($ListView2, $aRow[0]), $aRow[3], 3)
        _GUICtrlListView_AddSubItem($ListView2, _GUICtrlListView_FindInText($ListView2, $aRow[0]), $aRow[4], 4)
        _GUICtrlListView_AddSubItem($ListView2, _GUICtrlListView_FindInText($ListView2, $aRow[0]), $aRow[5], 5)
        _GUICtrlListView_AddSubItem($ListView2, _GUICtrlListView_FindInText($ListView2, $aRow[0]), $aRow[6], 6)
WEnd
_SQLite_Close();读取并显示在控件$ListView2上
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 20:47 , Processed in 0.072818 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表