Subversion Repositories SmartDukaan

Rev

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

Rev 17137 Rev 17140
Line 958... Line 958...
958
#         left join (select user_id, count(*) as order_count from order_view where status in ('ORDER_CREATED','DETAIL_CREATED')  group by user_id)as crm1 on ow.user_id = crm1.user_id
958
#         left join (select user_id, count(*) as order_count from order_view where status in ('ORDER_CREATED','DETAIL_CREATED')  group by user_id)as crm1 on ow.user_id = crm1.user_id
959
#         left join (select * from (select * from all_user_addresses order by source) s group by user_id)aua on aua.user_id=u.id 
959
#         left join (select * from (select * from all_user_addresses order by source) s group by user_id)aua on aua.user_id=u.id 
960
#         where (lower(u.referrer) not like 'emp%' or u.utm_campaign is not null) and u.activated = 1 and ow.status in ('ORDER_CREATED','DETAIL_CREATED'); 
960
#         where (lower(u.referrer) not like 'emp%' or u.utm_campaign is not null) and u.activated = 1 and ow.status in ('ORDER_CREATED','DETAIL_CREATED'); 
961
#         
961
#         
962
#         ''',)
962
#         ''',)
963
    con = MySQLdb.connect('localhost','root','shop2020','dtr')
963
#     con = MySQLdb.connect('localhost','root','shop2020','dtr')
964
    cur = con.cursor()
964
#     cur = con.cursor()
965
    cur.execute("select * from allorder")
965
#     cur.execute("select * from allorder")
966
    results = cur.fetchall()
966
#     results = cur.fetchall()
-
 
967
    results = Mysql.fetchResult("select * from allorder")
967
    row = 0
968
    row = 0
968
    i=-1
969
    i=-1
969
    worksheet.write(row, inc(), 'User Id', boldStyle)
970
    worksheet.write(row, inc(), 'User Id', boldStyle)
970
    #worksheet1.write(row, i, 'User Id', boldStyle)
971
    #worksheet1.write(row, i, 'User Id', boldStyle)
971
    worksheet.write(row, inc(), 'User name', boldStyle)
972
    worksheet.write(row, inc(), 'User name', boldStyle)