self.conn=MySQLdb.connect(host='localhost',port=3306, user='keystone', passwd='OptValley@4312', db=self.db_name)
self.cur = self.conn.cursor()
self.cur.execute(sqlstr)

rows=self.cur.fetchall()

rows的数据类型是个二维元组 ((1,1,1),)
如果为空是这样的((None,),)

注意元组只读不可修改

赠送:
随机读写:写速度快,读速度慢
顺序读写:链表结构,读速度块,写速度慢


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案