When I'm using python to fetch results from a SQL database I get extra charters at the beginning and end of the returned value. For example the below code returns ((56L,),) instead of 56, does anyone know how to get just the value... and what the (( ,),) actually mean...?
hp= 56
id= 3
database = MySQLdb.connect (host="localhost", user = "root", passwd = "", db = "db")
cursor = database.cursor()
cursor.execute("UPDATE period_option SET points =%s WHERE period_option_id =%s", (hp, id))
cursor.execute("SELECT points FROM period_option WHERE period_option_id =%s", (po_id_home))
results = cursor.fetchall()
print results