Q. Design a Python application that fetches only those records from Event table of menagerie database where type is Kennel.
Answer =
import mysql.connector as a mydb = a.connect(host="localhost",user="root",password="portal express", database = "menagerie") cur = mydb.cursor() run = "select * from Event where type = 'Kennel' " cur . execute(run) data = cur.fetchall() for i in data : print(i) mydb.close()
please upload output too
ReplyDeleteOk, I will try.
Deletepls upload output pls
ReplyDeleteThere is no given table, so how can i give u output .
Deleteso it means this quesn has no output
ReplyDeleteIt will give output if table is present in your database.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )