Process insert results

After the database server executes an INSERT statement, the mi_get_result() function returns a MI_DML statement status. You can obtain the following information about the statement:
  • The mi_result_row_count() function returns the number of rows that were inserted.
  • The value of the SERIAL, SERIAL8, or BIGSERIAL column in the row just inserted.
The SERIAL, SERIAL8, and BIGSERIAL data types allow you to have an integer column for which the database server automatically increments the value with each insert. You can obtain the newly inserted serial value for the most recent INSERT statement with the following DataBlade® API functions.
Serial data type DataBlade API function
SERIAL mi_last_serial()
SERIAL8 mi_last_serial8()
BIGSERIAL mi_last_bigserial()