execute(), it is time to look at the returned data.
Traversing the result set
Bool eof()
Check if you have reached the end of the result set.Bool first()
Start traversing by pointing to the 1st item in the result set.Bool next()
Move the pointer to the next item in the result set unless you have reached the end of the result set.String getField(Integer num)
Fetches the value of a field identified by its number (starting at 0). The string is retrieved from the current row/record.String getField(String name)
Fetches the value of a field identified by its name from the current row.Remember to prefix field names with their table name!
String getField(String field, String function)
Fetches the value of a field identified by its name from the current row, invokes a function, and returns the result as a string.Putting it all together
Example: get the first name of all customers with active requestsGetting statistics
You can retrieve statistics both before and after callingexecute(). These methods will ignore setLimit().