DB_common::affectedRows()

DB_common::affectedRows() -- Finds the number of affected rows

Synopsis

integer affectedRows ()

Description

Number of rows a query affected. Returns 0 for SELECT queries.

Return value

integer - number of rows or DB_Error when fail

Throws

Table 21-1. Possible PEAR_Error values

Error codeError messageReasonSolution
DB_ERROR_NOT_CAPABLE NULL Function is not supported by the database backend Switch to another database system, if you really need this feature.

Note

This function can not be called statically.

See

query()