Vely logo install | documentation | examples | changelog
16.10.0 released May 10, 2023

Purpose: Get or print out the row number of a current row in the result-set of a query.

current-row [ to [ define ] <current row> ]

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>, which is created if "define" is used. current-row must be within a run-query loop, and it always refers to the most inner one.
Display row number before a line with first and last name for each employee:
run-query @mydb="select firstName, lastName from employee"
    @Row #<<current-row>><br/>
    query-result firstName
    query-result lastName

See also
Database ( begin-transaction   commit-transaction   current-row   database_config_file   database_queries   delete-query   on-error   prepared_statements   query-result   rollback-transaction   run-query  )  SEE ALL (documentation)

Copyright (c) 2017-2023 Dasoftver LLC