小编Jef*_*eff的帖子

MYSQL在查询中包含NULL

$sql = "SELECT * FROM orders WHERE order_number>=$lower AND order_number<=$upper";
Run Code Online (Sandbox Code Playgroud)

我最近迁移了服务器 on the previous server this statement included ALL records between $upper and $lower.

新服务器excludes the NULL records between $upper and $lower.

不完整的订单连续保存,没有order_number; 和一个NULL值.

我假设有一个设置MYSQL.conf file.或者我使用的是不同版本的MYSQL,它不再支持自动包含查询中的NULL值.

mysql sql

3
推荐指数
1
解决办法
4707
查看次数

标签 统计

mysql ×1

sql ×1