def runquery(cursor, sql):
  """Returns a list of ResultRow objects based upon a connected cursor
     and a query sql string to execute"""
  
  # run the query
  cursor.execute(sql)
  
  # return the list
  return getdict(cursor.fetchall(), cursor.description)
Returns a list of ResultRow objects based upon a connected cursor
     and a query sql string to execute
recipes/Python/163605_resultsetpy/recipe-163605.py