Subversion Repositories SmartDukaan

Rev

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

Rev 17326 Rev 17327
Line 243... Line 243...
243
            brand= bra
243
            brand= bra
244
            count=cow
244
            count=cow
245
            weight=cow*product_view_weight
245
            weight=cow*product_view_weight
246
            source='product_view'
246
            source='product_view'
247
            category_id=3
247
            category_id=3
248
            sql = "insert into newuserlinkssegmentation7days (user_id, brand, category_id, source, count,weight,created) values(%s, %s, %s, %s, %s,%s,%s)"
248
            sql = "replace into newuserlinkssegmentation7days (user_id, brand, category_id, source, count,weight,created) values(%s, %s, %s, %s, %s,%s,%s)"
249
            cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now()))
249
            cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now()))
250
            conn.commit()
250
            conn.commit()
251
            
251
            
252
    for x, y in userTabletCategory.iteritems():
252
    for x, y in userTabletCategory.iteritems():
253
        for bra,cow in y.iteritems():
253
        for bra,cow in y.iteritems():
Line 255... Line 255...
255
            brand= bra
255
            brand= bra
256
            count=cow
256
            count=cow
257
            weight=cow*product_view_weight
257
            weight=cow*product_view_weight
258
            source='product_view'
258
            source='product_view'
259
            category_id=5
259
            category_id=5
260
            sql = "insert into newuserlinkssegmentation7days (user_id, brand, category_id, source, count,weight,created) values(%s, %s, %s, %s, %s,%s,%s)"
260
            sql = "replace into newuserlinkssegmentation7days (user_id, brand, category_id, source, count,weight,created) values(%s, %s, %s, %s, %s,%s,%s)"
261
            cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now()))
261
            cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now()))
262
            conn.commit()
262
            conn.commit()
263
    conn.close()
263
    conn.close()
264
    
264
    
265
    print '********** Completed inserting records for store product view in last 7 day table *********'
265
    print '********** Completed inserting records for store product view in last 7 day table *********'