pymysql:属于python的一个模块

pip3 install pymysql

conn  = pymysql.connect(...,charset = 'uft8')

创建游标
conn.cursor(dic)

(1)修改数据,删除数据,增加数据一定要commit
    cursor.execut(sql,{}|()|[]) 一定要注意sql注入
(2)fetchone()
   fetchmany(4)
   fetchall()

cursor.close()
conn.close()
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-11
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2021-09-04
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案