readquery (function)¶
- fundamentals.mysql.readquery(sqlQuery, dbConn, log, quiet=False)[source][source]¶
Given a mysql query, read the data from the database and return the results as a list of dictionaries (database rows)
Key Arguments
log– the logger.sqlQuery– the MySQL command to executedbConn– the db connectionquiet– ignore mysql warnings and errors and move on. Be careful when setting this to true - damaging errors can easily be missed. Default False.
Return
rows– the rows returned by the sql query
Usage
```python from fundamentals.mysql import readquery rows = readquery(
log=log, sqlQuery=sqlQuery, dbConn=dbConn, quiet=False
)¶