怎样查询SQLite表中的总行数|?[已解决]
本帖最后由 cazn52117 于 2015-7-11 09:01 编辑$sqlhangID = 0
$sqljishutemp = 0
_SQLite_Open($SQLite_Data_Path)
_SQLite_Query(-1, "SELECT * FROM" & $a & " ORDER BY IDs DESC;", $hQuery)
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
$sqljishutemp = $sqljishutemp + 1
$sqlhangID = $aRow
WEnd
_SQLite_Close()
这样是能得到结果 但数据一多就很卡,有解决办法吗? _SQLite_Query(-1, "SELECT count(*) FROM COMPANY;", $hQuery)
不知道这样可以吗~~然后用什么语句来取得SELECT count(*) FROM COMPANY;计算回来的值啊 SELECT max(rowid) FROM tablename这个是最快的,可以试下 count(字段名)
页:
[1]