Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- queryObtainID = "SELECT ProductID FROM products WHERE ProductCode = "
- queryObtainImages = "SELECT ProductImage FROM productimages WHERE ProductID = "
- db = mysql.connector.connect(user=db_username, password=db_password, host=db_hostname, database=db_name)
- file = "export (1).csv"
- with open(file, 'rb') as f:
- reader = csv.reader(f)
- rownum = 0
- for row in reader:
- if rownum == 0:
- header = row[0]
- rownum += 1
- else:
- productCode = str(row[0])
- obtainImages(db,productCode, queryObtainID, queryObtainImages)
- int(float(row[0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement