Use DictCursor ouf oursql to get better readability in MYSQL_RED_PAGE

This commit is contained in:
2015-09-06 16:02:30 +02:00
parent d2dfa15ddf
commit 773557a591

View File

@@ -46,7 +46,7 @@ class MYSQL_RED_PAGE( MYSQL_RED ):
@returns tuple Tuple with data for given page_id otherwise if none found
bool FALSE
"""
cursor = type( self ).connection.cursor()
cursor = type( self ).connection.cursor(mysqldb.DictCursor)
format_str = """SELECT * FROM `red_pages` WHERE page_id={page_id};"""
query = format_str.format( page_id=int( page_id ) )