1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
.TH GOLF 2gg $VERSION $DATE Development Tools
.SH NAME
current-row \- (database)
.SH PURPOSE
Get or print out the row number of a current row in the result-set of a query.
.SH SYNTAX
.RS 4
.EX
current-row [ to <current row> ]
.EE
.RE
.SH DESCRIPTION
Without "to" clause, current-row will print out the current row number. First row is numbered 1. With "to" clause, the row number is stored into variable <current row>. current-row must be within a \fBrun-query\fP loop, and it always refers to the most inner one.
.SH EXAMPLES
Display row number before a line with first and last name for each employee:
.RS 4
.EX
run-query @mydb="select firstName, lastName from employee" output firstName, lastName
@Row #<<current-row>><br/>
print-out firstName
@,
print-out lastName
@<br/>
end-query
.EE
.RE
.SH SEE ALSO
Database
\fBbegin-transaction\fP
\fBcommit-transaction\fP
\fBcurrent-row\fP
\fBdatabase-config-file\fP
\fBdb-error\fP
\fBmariadb-database\fP
\fBpostgresql-database\fP
\fBrollback-transaction\fP
\fBrun-query\fP
\fBsqlite-database\fP
See all
\fBdocumentation\fP
|