dbtest.py 218 B

123456
  1. import dataset
  2. db = dataset.connect('mysql://johnny:pAsJohnny_2022@db.ptt.cx:3306/google_poi?charset=utf8mb4')
  3. cursor=db.query('SELECT count(*) as cnt FROM google_poi.shop_list3')
  4. for c in cursor:
  5. print(c['cnt'])