import mysql.connector as c
mydb = c.connect(
host=" 172.16.25.53",
user="root",
password="1234",
database="cvr"
)
mycursor = mydb.cursor()
mycursor.execute("select * from sunny order by score asc")
students=mycursor.fetchall()
for std in students:
print(std)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter