12 lines
566 B
Python
12 lines
566 B
Python
# -*- coding: utf-8 -*-
|
|
import io, sys, pymysql
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
conn = pymysql.connect(host='192.168.1.161', user='devgps', password='dev@2021GPS',
|
|
database='zentao_dev_2026', charset='utf8mb4')
|
|
cur = conn.cursor()
|
|
cur.execute("SELECT id, title, product, status, code_review_status FROM zt_story WHERE id=9130")
|
|
print("9130:", cur.fetchone())
|
|
cur.execute("SHOW COLUMNS FROM zt_story")
|
|
cols=[r[0] for r in cur.fetchall()]
|
|
print("url 字段:", [c for c in cols if 'url' in c or 'review' in c])
|