NUM_ROWS

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT





X


Purpose

The number of rows in the table that Net.Data is processing in the REPORT block. The number of rows is affected by the value of the upper limit parameter defined for the Net.Data table holding the data. For example, if upper limit is set to 30, but the SELECT statement returns 1000 rows, the value of NUM_ROWS is 30. Additionally, if upper limit is set to 30 and the SELECT statement returns 20 rows, NUM_ROWS equals 20. See TABLE Statement for more information about the TABLE statement and the upper limit parameter.

NUM_ROWS is not affected by the value of START_ROW_NUM as long as START_ROW_NUM is not passed to the language environment. For example, if START_ROW_NUM is set to 5 (specifying that the table displayed on the Web page should be populated starting with row 5) and the SELECT statement returns 25 rows, NUM_ROWS is set to 25, not 21. The first four rows are discarded from the table, but are included in the value of NUM_ROWS. However, if START_ROW_NUM is passed to the language environment, then NUM_ROWS will only contain the number of rows starting at the row specified by START_ROW_NUM. In the example above, NUM_ROWS will be set to 21.

You can reference NUM_ROWS in REPORT and ROW blocks.

Examples

Example 1: Displays the number of names being processed in the REPORT block

%DEFINE DTW_SET_TOTAL_ROWS="YES"
 
%REPORT{
<h2>E-mail directory</h2>
<ul>
%ROW{
<li>Name: <a href="mailto:$(V1)">$(V2)</a><br />
Location: $(V3)
%}
</ul>
Names displayed: $(NUM_ROWS)<br />
Names found: $(TOTAL_ROWS)
%}


[ Top of Page | Previous Page | Next Page | Index ]