Commit 724824ce authored by 张彦钊's avatar 张彦钊

sql语句中的花括号加了一个单引号

parent e21cc5af
...@@ -30,7 +30,7 @@ def get_eachCityDiaryTop2000(): ...@@ -30,7 +30,7 @@ def get_eachCityDiaryTop2000():
allCitiesTop2000 = get_allCitiesDiaryTop2000() allCitiesTop2000 = get_allCitiesDiaryTop2000()
for i in cityList: for i in cityList:
sql = "select city_id,cid from data_feed_click " \ sql = "select city_id,cid from data_feed_click " \
"where cid_type = 'diary' and city_id = {0} " \ "where cid_type = 'diary' and city_id = '{0}' " \
"order by click_count_choice desc limit 2000".format(i) "order by click_count_choice desc limit 2000".format(i)
data = con_sql(sql) data = con_sql(sql)
data = data.rename(columns={0:"city_id",1:"cid"}) data = data.rename(columns={0:"city_id",1:"cid"})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment