Execute basic SQL statements

The mi_exec() function provides the simplest way to send a basic SQL statement to the database server for execution. A basic SQL statement is one that does not need to be prepared. That is, the statement does not execute many times in the DataBlade® API module or it does not contain input parameters.

To send a basic SQL statement to the database server for execution, take the following steps:
  • Assemble a statement string, which contains the SQL statement to execute.
  • Send the statement string to the database server with mi_exec().

The database server parses the statement string, optimizes it, executes it, and sends back the statement results.