python操作数据库MySQL

查询数据 conn = connect(host,port,user,password,charset) 创建cursor对象 cs1 = conn.cursor() 通过execute执行sql语句 count = cs1.execute(’…’) 往外取数据 cs1.fetchmany() cs1.fetchall() cs1.fetchone() 关闭Cursor对象 cs1.close()
相关文章
相关标签/搜索