sqlite_has_more

mIRC SQLite

sqlite_has_more
Returns whether or not more rows are available.
Syntax
$sqlite_has_more ( result )
Parameters
result
The result identifier.
Return Value
1 if there are more rows available; Otherwise 0 if there are no more rows available, or $null if there was an error.
Example
; This code assumes a connection is already established and stored in %db
var %sql = SELECT * FROM table
var %res = $sqlite_query(%db, %sql)
if (%res) {
  ; Counts number of rows, unpractical as you could just use $sqlite_num_rows, this is only to show usage
  var %rows = 0
  while ($sqlite_has_more(%res)) {
    sqlite_next %res
    inc %rows
  }
  echo -a Number of rows returned: %rows
  sqlite_free %res
}
else {
  echo -a Error executing query: %sqlite_errstr
}