pymysql

作者: shaoliang 2020-03-31 11:40   访问数:706

                                                         

import pymysql

conn = pymysql.connect('localhost', '*', '**', 'www')
c = conn.cursor()
c.execute("select * from drcms_type")
for row in c.fetchall():
    id = row[0]
    name = row[1]
    print(id)

conn.close()


import pymysql

conn = pymysql.connect('localhost', '*', '**', 'www')
c = conn.cursor()
c.execute("select * from drcms_type")
for row in c.fetchall():
    id = row[0]
    name = row[1]
    print(id)

conn.close()


鲁ICP备19029146号-1 管理
CopyRight@51dr.top 页面打开时间 0.0319 秒.