Subversion Repositories SmartDukaan

Rev

Rev 15914 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15914 Rev 16337
Line 23... Line 23...
23
datetime_format.num_format_str = 'yyyy/mm/dd HH:MM AM/PM'
23
datetime_format.num_format_str = 'yyyy/mm/dd HH:MM AM/PM'
24
 
24
 
25
default_format = xlwt.XFStyle()
25
default_format = xlwt.XFStyle()
26
 
26
 
27
NON_REGISTERED_USERS="""
27
NON_REGISTERED_USERS="""
-
 
28
SELECT  p.user_id as count FROM pushnotifications p join 
28
SELECT  p.user_id as count FROM pushnotifications p join notification_campaigns n on p.notification_campaign_id=n.id WHERE p.message = 'NotRegistered' 
29
notification_campaigns n on p.notification_campaign_id=n.id 
-
 
30
WHERE p.message = 'NotRegistered' 
29
and datediff(now(),n.created) <= 7  group by p.user_id having count(1) >=5;
31
group by p.user_id having count(1) >=5;
30
"""
32
"""
31
 
33
 
32
#select * from pushnotifications where datediff(now(),created) <= 7 and user_id=%s and status=1;
34
#select * from pushnotifications where datediff(now(),created) <= 7 and user_id=%s and status=1;
33
CHECK_NON_REGISTERED_USERS="""
35
CHECK_NON_REGISTERED_USERS="""
34
select * from pushnotifications where datediff(now(),created) <=7 and datediff(now(),created)>=2 and user_id=%s and status=1;
36
select * from pushnotifications where datediff(now(),created) <=7 and datediff(now(),created)>=2 and user_id=%s and status=1;