Next: null.values Up: Communication with the MySQL Previous: remaining.rows Contents
Subsections

- Answer
- Errors

### `affected.rows`

Returns the number of rows affected by the last query.

#### Answer

`data.affected.rows; INT`. For INSERT, DELETE or UPDATE statements, this number indicates how many rows were affected by the update. For SELECT statements this number is the same as the one returned by `data.ready`.

#### Errors

`no.data.error` if the last query caused a `mysql.error` or if no query has been executed yet.