พอดีผมจะส่งต่อไปยังตัวของ html ไม่ทราบมาวิธีไหนจัดการข้อมูลได้บ้างครับ
โค้ด: เลือกทั้งหมด
cur=con.cursor()
cur.execute('insert into get_data_user(username,countb,countth,countthai,counte,counteng,date,ip,word) values (%s,%s,%s,%s,%s,%s,%s,%s,%s)',(name ,countB,countTh,countthai,countE,counteng,now,IPa,text))
cur.execute('select * from get_data_user order by id Desc limit 5;')
print(cur.fetchall())
con.commit()
cur.close()
con.close()
[(35, 'แซม', 0, 8, 3, 0, 0, datetime.date(2022, 6, 2), '127.0.0.1'), (33, 'แซม', 2, 10, 4, 6, 1, datetime.date(2022, 6, 2), '127.0.0.1'), (32, 'sadf', 0, 0, 0, 8, 1, datetime.date(2022, 6, 2), '127.0.0.1'), (31, 'asdf', 0, 0, 0, 4, 1, datetime.date(2022, 6, 2), '127.0.0.1'), (30, 'sadf', 0, 0, 0, 8, 1, datetime.date(2022, 6, 2), '127.0.0.1')]
ผมจะดึงข้อมูลตรงนี้ไปใช้ต่อยังไงครับ