Following the mi_exec() function for a typical SELECT query, mi_get_result() first returns MI_ROWS to indicate that row data is available. The example get_data() function then iterates over all the rows and returns control to the top of the loop. The next call to mi_get_result() returns MI_DML because a data manipulation statement was completed (the iteration in get_data() completed it). A final call to mi_get_result() returns MI_NO_MORE_RESULTS, and the loop terminates.