PDF (US Ltr) - 4.1Mb
count = cursor.rowcount
This read-only property returns the number of rows returned for
SELECT statements, or the number
of rows affected by DML statements such as
UPDATE. For an example, see
Section 220.127.116.11, “MySQLCursor.execute() Method”.
For nonbuffered cursors, the row count cannot be known before the rows have been fetched. In this case, the number of rows is -1 immediately after query execution and is incremented as rows are fetched.
rowcount property is like the
mysql_affected_rows() C API
function; see mysql_affected_rows().