Vely logo Empower C
install  tutorials  examples
documentation  license  about

12.1.0 released on Sep 19, 2022

current-row



PURPOSE:


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

SYNTAX:


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


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>, 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.

EXAMPLES:


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
    @<br/>
end-query


SEE ALSO:


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



Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Icons copyright PaweĊ‚ Kuna licensed under MIT. This web page is licensed under CC-BY-SA-4.0.