def showDataWithReturn(self):
# connect to MySQL
conn, cursor = self.connect()
self.useGuiDB(cursor)
# execute command
cursor.execute("SELECT * FROM books")
booksData = cursor.fetchall()
cursor.execute("SELECT * FROM quotations")
quoteData = cursor.fetchall()
# close cursor and connection
self.close(cursor, conn)
# print(booksData, quoteData)
for record in quoteData:
print(record)
return booksData, quoteData
#------------------------------------------------------
GUI_MySQL_class.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录