Subversion Repositories SmartDukaan

Rev

Rev 15726 | Rev 15759 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15726 Rev 15727
Line 31... Line 31...
31
        }
31
        }
32
 
32
 
33
db = MySQLdb.connect('localhost',"root","shop2020","dtr" )
33
db = MySQLdb.connect('localhost',"root","shop2020","dtr" )
34
cursor = db.cursor()
34
cursor = db.cursor()
35
 
35
 
36
PUSH_NOTIFICATIONS_SQL = "select p.id, p.user_id, n.*, g.gcm_regid from pushnotifications p join notification_campaigns n on p.notification_campaign_id = n.id join (select * from (select * from gcm_users order by id desc) as X group by user_id) as g on p.user_id = g.user_id where p.type ='pending'"
36
PUSH_NOTIFICATIONS_SQL = "select p.id, p.user_id, n.*, g.gcm_regid from pushnotifications p join notification_campaigns n on p.notification_campaign_id = n.id left outer join (select * from (select * from gcm_users order by id desc) as X group by user_id) as g on p.user_id = g.user_id where p.type ='pending'"
37
ALL_STORES_SQL = "select * from stores"
37
ALL_STORES_SQL = "select * from stores"
38
 
38
 
39
cursor.execute(ALL_STORES_SQL)
39
cursor.execute(ALL_STORES_SQL)
40
result_stores = cursor.fetchall()
40
result_stores = cursor.fetchall()
41
domainStoresMap = {}
41
domainStoresMap = {}