我正在尝试使用 idocscript 查找 ResultSet 中的行数。除了如下循环遍历 ResultSet 之外,还有其他最佳方法吗?
<$sampleRSLength=0$>
<$if rsExists("sampleResultSet")$>
<$loop sampleResultSet$>
<$sampleRSLength=sampleRSLength+1$>
<$endloop$>
<$endif$>
我正在尝试使用 idocscript 查找 ResultSet 中的行数。除了如下循环遍历 ResultSet 之外,还有其他最佳方法吗?
<$sampleRSLength=0$>
<$if rsExists("sampleResultSet")$>
<$loop sampleResultSet$>
<$sampleRSLength=sampleRSLength+1$>
<$endloop$>
<$endif$>
在详细阅读了 IdocScript参考指南后,我自己找到了答案。
Idocscript 有一种方法rsNumRows()
可用于获取结果集中的行数。
<$if rsExists("sampleResultSet")$>
<$sampleRSLength=rsNumRows("sampleResultSet")$>
<$endif$>
<$sampleResultSet.#numRows$>
也将工作。