diff --git a/mysql_red.py b/mysql_red.py index 616ac3e..144e7ef 100644 --- a/mysql_red.py +++ b/mysql_red.py @@ -48,10 +48,7 @@ class MYSQL_RED_PAGE( MYSQL_RED ): """ 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 ) ) - - cursor.execute( query ) + cursor.execute( 'SELECT * FROM `red_pages` WHERE `page_id` = ?;', ( page_id, ) ) res = cursor.fetchone() if res: