9 lines
445 B
Python
9 lines
445 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 action, COUNT(*) c FROM zt_action WHERE objecttype='story' GROUP BY action ORDER BY c DESC LIMIT 15")
|
|
for r in cur.fetchall(): print(r)
|