Next: query.row; MOBILE []BYTE Up: Communication with the MySQL Previous: Communication with the MySQL Contents
Subsections

- Answer
- Errors

### `query; MOBILE []BYTE`

This message carries a string describing an SQL query to be executed. Currently, support for multiple queries in one string (separated by semicolons) is not implemented. Remember that '*' is the escape character in occam, so you should write e.g. "SELECT ** FROM table".

#### Answer

When the query has executed successfully, the process will send a `data.ready; INT` message detailing how many rows were returned from the query. If the query was an UPDATE, DELETE or INSERT statement, or if it was a SELECT statement that didn't match any rows, the integer will be 0.

#### Errors

- `mysql.error; INT; MOBILE []BYTE` if an SQL error occurred. The error number may be compared with the values `cr.server.gone.error` and `cr.server.lost` to determine if the connection has been lost. If so, the application might try to reconnect.
- `not.connected.error` if the process could not initially connect to the server or if a subsequent attempt to reconnect has failed.

Next: query.row; MOBILE []BYTE Up: Communication with the MySQL Previous: Communication with the MySQL Contents