MySQL 数据格式设为 varchar 和 datetime 都存不进去:
login_time = "2018-05-16 23:28:13"
cursor.execute("insert into user_logs (user_id, login_time) values (%s, %s)" % \
(int(user_id), login_time))
出错提示( MySQL5.5):
_mysql_exceptions.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 '23:28:13)' at line 1")