day-43mysql

A: pymysql (Python operations MySQL)
  method: pip3 install pymysql
Note:

  . A conn, the Cursor run out need to close the resource connection

  b query time, fetchone, fetchmany, fetchall, default returns a tuple, need to return to the dictionary of words: = conn.cursor the Cursor (the Cursor = pymysql.cursors.DictCursor)

  c. deletion and update when needed after execute, add conn.commit ()

  

      In cmd tee: Redirect to import a certain file

Guess you like

Origin www.cnblogs.com/klw1/p/11025566.html