Goes to the next row (i.e next record) of the query result.
When SQLFetch is called for the first time, the current record will be the first record selected by the query.
This function is used to browse the query result "line by line". For more details on the different modes to loop through a query result, see Types of SQL browse
<Result> = SQLFetch(<Query name>)
0 if the record was successfully read. The data can be retrieved by SQLGetMemo and SQLGetCol.
<Query name>: Character string
The queries created with the query editor must be specified in the format of a character string.
SQLFetch: Partial retrieval of the query result
SQLFetch does not retrieve all the rows of the query result: SQLFetch only returns the current record.
Therefore, the total number of result rows (SQL.NbLine
) cannot be retrieved by SQLInfo
is used to browse the result.
Life cycle of a browse
The time it takes SQLFetch to retrieve data from the result is limited to the execution time of the PHP script. SQLFetch cannot continue to retrieve data after the page is returned (even in Session mode).