Sunday, 12 June 2016

Python: MySQLdb: Reading data

Cursor class provides methods and properties to read records/information about a table.

Method
Description
fetchone()
Fetch next row of query result set. Return None, when no data is available.
fetchmany ([ size=cursor.arraysize ])
Fetch number of rows as indicated by the size parameter.
.fetchall()
Fetch all rows corresponding to given query.


Attribute
Description
.rowcount
Return number of rows produced by last execute method (or) effected (During update, delete operations).





Previous                                                 Next                                                 Home

No comments:

Post a Comment