I have an database called sportschool and one record looks like this
ID Logouttime Logintime totaltime
What i want to do is for example where id is 1(this can be different depending on the user input) is retreive the logintime and store that in a variable
This is what i have now:
aa= pymysql.connect(host='',user='',passwd='',db='',)
mm = aa.cursor()
mm.execute('SELECT Logouttime FROM sportschool WHERE ID = 1')
but how can i store it in a variable then? Insert works fine but i need to retreive the data and store it so i can calculate the difference betwheen logintime and loguittime
Hope someone can help