mysql int类型字段插入空字符串时自动转为0

如果不想转的话可以修改配置文件

 

修改 my.ini 文件.

# Set the SQL mode to strict
sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

改为:

# Set the SQL mode to strict
sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

相关文章:

  • 2022-12-23
  • 2021-11-08
  • 2021-08-30
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案