作者: shaoliang 2020-03-31 11:40   访问数:872
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()