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
你把插入數(shù)據(jù)庫(kù)的代碼注釋掉,然后只是打印名字和網(wǎng)址,看看需要多久。
2016-09-25
代碼一樣,這個(gè)是數(shù)據(jù)庫(kù)配置不對(duì)嗎
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操作放在最后來(lái)做,同時(shí)調(diào)用cursor.executemany, 一次可以插入多條記錄