这应该是一个简单的解决方案,但我无法解决它。 我有一张 table
这是我的查询
$salary=2000;
select deductions from nhif_tbl where to_end <=$salary and start_from >= $salary;
查询返回 null。 我的问题是如何修改查询以便在这种情况下获得正确的扣除“60”
最佳答案
select deductions from nhif_tbl where to_end >=$salary and start_from <= $salary;
关于php - 如何在 select 语句中使用 'between',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21593739/