Guest User

Untitled

a guest
Nov 29th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s IGNORE INTO TABLE jeremy_table_test FIELDS TERMINATED BY ',' LINES TERMINATED' at line 1
  2.  
  3. date_sourced, sha1, suggested, vsdt, trendx, falcon, notes, mtf
  4.  
  5. SHA1,suggestedName
  6.  
  7. import mysql.connector
  8. mydb = mysql.connector.connect(user='root', password='',
  9. host='localhost',database='jeremy_db')
  10.  
  11. cursor = mydb.cursor()
  12. query = "LOAD DATA INFILE %s IGNORE INTO TABLE jeremy_table_test FIELDS TERMINATED BY ',' LINES TERMINATED BY 'rn' IGNORE 1 LINES (@col1,@col2) set suggested=@col2 where sha1=@col1"
  13. cursor.execute(query, (fullPath))
  14. mydb.commit()
Add Comment
Please, Sign In to add comment