Subversion Repositories SmartDukaan

Rev

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

Rev 17317 Rev 17320
Line 98... Line 98...
98
        else:
98
        else:
99
            category_id=r[2] 
99
            category_id=r[2] 
100
        count=r[3]
100
        count=r[3]
101
        source=r[4]
101
        source=r[4]
102
        weight=r[5]
102
        weight=r[5]
-
 
103
        if brand is not 'NA':
103
        sql = "replace into newuserlinkssegmentation (user_id, brand, category_id, source, count,weight,created,modified) values(%s, %s, %s, %s, %s,%s,%s,%s)"
104
            sql = "replace into newuserlinkssegmentation (user_id, brand, category_id, source, count,weight,created,modified) values(%s, %s, %s, %s, %s,%s,%s,%s)"
104
        cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now(),datetime.now()))
105
            cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now(),datetime.now()))
105
        conn.commit()
106
            conn.commit()
106
    conn.close()
107
    conn.close()
107
    print '********** Completed inserting records for orders,preferences and clicks in master table *********'
108
    print '********** Completed inserting records for orders,preferences and clicks in master table *********'
108
    
109
    
109
def filters():
110
def filters():
110
    print '********** Inserting records for filters in master table *********'
111
    print '********** Inserting records for filters in master table *********'
Line 132... Line 133...
132
            brand=bra
133
            brand=bra
133
            count=cow
134
            count=cow
134
            category_id=3
135
            category_id=3
135
            weight=cow*filter_weight
136
            weight=cow*filter_weight
136
            source='filters'
137
            source='filters'
-
 
138
            if brand is not 'NA':
137
            sql = "replace into newuserlinkssegmentation (user_id, brand, category_id, source, count,weight,created,modified) values(%s, %s, %s, %s, %s,%s,%s,%s)"
139
                sql = "replace into newuserlinkssegmentation (user_id, brand, category_id, source, count,weight,created,modified) values(%s, %s, %s, %s, %s,%s,%s,%s)"
138
            cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now(),datetime.now()))
140
                cursor.execute(sql,(user_id,brand, category_id, source, count,weight,datetime.now(),datetime.now()))
139
            conn.commit()
141
                conn.commit()
140
    
-
 
141
    conn.close()
142
    conn.close()
142
    print '********** Completed inserting records for filters in master table *********'
143
    print '********** Completed inserting records for filters in master table *********'
143
    
144
    
144
def storeProductView():
145
def storeProductView():
145
    print '********** Inserting records for store product view in master table *********'
146
    print '********** Inserting records for store product view in master table *********'