import dataset db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4') # cursor=db.query("SELECT q,cnt FROM hhh.gap_searchome order by cnt desc") # cursor=db.query("SELECT q,cnt FROM hhh.gap_hhh order by cnt desc") # cursor=db.query("SELECT q,cnt FROM hhh.gap_searchome where q not in (select q from hhh.gap_hhh) order by cnt desc;") # cursor=db.query("SELECT q,cnt FROM hhh.gap_d100 where q not in (select q from hhh.gap_hhh) order by cnt desc;") #cursor=db.query('SELECT * FROM seo.term_progress limit 10') #for c in cursor: # print(c['title']) table=db['test'] table.insert({'id':1234,'name':'test name','title':'中文測市'})