title: ProgrammingError: You have an error in your SQL syntax; at line 1
body: <p>ProgrammingError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1</p>
  
  <p>This error keeps occurring as I try to bring web-scraped data from a list into a database on mysql. I've no idea how to remedy, i've tried adding '' around string inputs but nothing seems to be working. </p>
  
  <pre><code>for container in listings:
      #extracting price
      price = container.div.div.strong.text
      price = price.strip('AMV: €')
      price = price.strip('Reserve: €')
      price = price.replace(',', "")
      price = int(price)
      p_list.append(price)
  
      #location
      location = container.div.find("a", {"class":"PropertyInformationCommonStyles__addressCopy-- 
      link"}).text
      n_list.append("'"+location+"'")
      #house type
      house = container.div.find("div", {"class":"QuickPropertyDetails__propertyType"}).text
      h_list.append("'"+house+"'")
      #number of bathrooms
      bath_num = container.div.find("div", {"class":"QuickPropertyDetails__iconCopy-- 
      WithBorder"}).text
      #makes str and int
      bath_num = int(bath_num)
      ba_list.append(bath_num)
          #number of bedrooms
      bed_num = container.div.find("div", {"class":"QuickPropertyDetails__iconCopy"}).text
      bed_num = int(bed_num)
      be_list.append(bed_num)
      #makes str and int
      all_var.append((price, location, house, bath_num, bed_num))
      #connecting to database     
  import mysql.connector
  
  d_b = mysql.connector.connect(host = "localhost", user = "MY_ACCOUNT", passwd = "MY_PASSWORD", database 
  = "daftdatabase",)
  print(d_b)
  mycursor = d_b.cursor()
  #create database
  #mycursor.execute("CREATE DATABASE daftdatabase")
  #create table
  #mycursor.execute("CREATE TABLE DaftTable(price Integer(10), location VARCHAR(50), type VARCHAR(20), bedrooms INTEGER(2),  bathrooms INTEGER(2))")
  show_table = mycursor.execute("SHOW TABLE")
  
  for var in all_var:
  data = mycursor.execute("INSERT INTO DaftTable(price, location, type, bathrooms, bedrooms) 
  VALUES"+var)
  </code></pre>
  
  <p>Genuinely no idea what to do so any help would be appreciated!</p>