query = query % ('somecol', 'DESC')
conn = app_globals.pool.connection()
cur = conn.cursor()
cur.execute(query, (limit1, limit2))
results = cur.fetchall()
How can I format strings to query with mysqldb in Python?