pymysql.err.ProgrammingError: (1064, "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 '~urls~(~urlname~, ~urlhref~)values('Wikipedia', 'https://en.wikipedia.org/wiki/W' at line 1")
2016-09-05
你把插入數據庫的代碼注釋掉,然后只是打印名字和網址,看看需要多久。
2016-09-25
代碼一樣,這個是數據庫配置不對嗎
pymysql.err.ProgrammingError: (1064, "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 '~urls~(~urlname~, ~urlhref~)values('Wikipedia', 'https://en.wikipedia.org/wiki/W' at line 1")
2016-09-05
上面代碼我換了思路,把mysql操作放在最后來做,同時調用cursor.executemany, 一次可以插入多條記錄