使用pymysql时报错1292 "Incorrect date value: '1983' for column 'crawl_date' at row 1"

其原因时在where后面限定日期时,日期外应加单引号,
错误写法:
“select game_SteamID from steam_dailyTopGame where crawl_date=%s” % str(today)
正确写法:
“select game_SteamID from steam_dailyTopGame where crawl_date=’{}’”.format(str(today))


版权声明:本文为weixin_40530363原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。