Index: trunk/fundraiser-statistics/fundraiser-scripts/classes/QueryData.py |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | __revision__ = "$Rev$" |
30 | 30 | __date__ = "November 28th, 2010" |
31 | 31 | |
32 | | -import TimestampProcessor as TP |
| 32 | +import Fundraiser_Tools.classes.TimestampProcessor as TP |
33 | 33 | import datetime |
34 | 34 | |
35 | 35 | def format_query(query_name, sql_stmnt, args): |
— | — | @@ -187,7 +187,13 @@ |
188 | 188 | interval = args[3] |
189 | 189 | |
190 | 190 | sql_stmnt = sql_stmnt % (campaign, '%', '%', '%', '%', interval, interval, start_time, end_time, campaign, '%', '%', '%', '%', interval, interval, start_time, end_time, campaign) |
| 191 | + |
| 192 | + elif query_name == 'report_campaign_totals': |
| 193 | + start_time = args[0] |
| 194 | + end_time = args[1] |
191 | 195 | |
| 196 | + sql_stmnt = sql_stmnt % (start_time, end_time) |
| 197 | + |
192 | 198 | else: |
193 | 199 | return 'no such table\n' |
194 | 200 | |
— | — | @@ -214,6 +220,8 @@ |
215 | 221 | return 1 |
216 | 222 | elif query_name == 'report_campaign_metrics_minutely_total': |
217 | 223 | return 1 |
| 224 | + elif query_name == 'report_campaign_totals': |
| 225 | + return 0 |
218 | 226 | |
219 | 227 | |
220 | 228 | def get_count_index(query_name): |
— | — | @@ -438,6 +446,11 @@ |
439 | 447 | return 2 |
440 | 448 | else: |
441 | 449 | return -1 |
| 450 | + elif query_name == 'report_campaign_totals': |
| 451 | + if metric_name == 'donations': |
| 452 | + return 1 |
| 453 | + else: |
| 454 | + return -1 |
442 | 455 | |
443 | 456 | else: |
444 | 457 | return 'no such table' |