0

Idocscript を使用して ResultSet の行数を見つけようとしています。以下のように ResultSet をループする以外に最適な方法はありますか?

<$sampleRSLength=0$>
<$if rsExists("sampleResultSet")$>
  <$loop sampleResultSet$>
    <$sampleRSLength=sampleRSLength+1$>
  <$endloop$>
<$endif$>
4

2 に答える 2

1

IdocScriptリファレンス ガイドを詳しく読んだ後、自分で答えを見つけることができました。

Idocscript にはrsNumRows()、結果セットの行数を取得するために使用できるメソッドがあります。

<$if rsExists("sampleResultSet")$>
 <$sampleRSLength=rsNumRows("sampleResultSet")$>
<$endif$>
于 2015-12-23T22:49:10.933 に答える