Commit a4040d54a758ec888ba455d294ca1c28d9c13c08

Authored by Noah ago
1 parent acb8480ea6
Exists in master

최종본 저장

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -78,6 +78,7 @@
78 78 "post_video_complete_views_paid"]
79 79  
80 80 sqlprefix = "insert into facebook_insights2 ("
  81 + sqlreplace = "REPLACE into facebook_insights2_last ("
81 82 sqlvalues = " values ("
82 83  
83 84 sqlprefix += "`p_id`, "
... ... @@ -96,7 +97,6 @@
96 97  
97 98 for list in lists:
98 99 #print list, insight.getContentInsightByKey(list)
99   -
100 100 sqlprefix += "`" + list.replace(',','_') + "`, "
101 101 #print list.replace(',','_')
102 102 sqlvalues += str(insight.getContentInsightByKey(list)) + ", "
103 103  
... ... @@ -104,8 +104,8 @@
104 104 sqlprefix = sqlprefix[:len(sqlprefix)-2] + ")"
105 105 sqlvalues = sqlvalues[:len(sqlvalues)-2] + ");"
106 106  
107   - #print sqlprefix + sqlvalues
108 107 datadb.fb_insert(sqlprefix + sqlvalues)
  108 + datadb.fb_insert(sqlreplace + sqlprefix[32:] + sqlvalues)
109 109 #print sqlprefix + sqlvalues
110 110  
111 111 del(datadb)