当前位置: 代码迷 >> PHP >> Mysql 数据库有关问题,该语句是什么意思
  详细解决方案

Mysql 数据库有关问题,该语句是什么意思

热度:269   发布时间:2016-04-28 19:06:43.0
Mysql 数据库问题,该语句是什么意思
$query = "select orderid from orders where  
               customerid = $customerid and  
               amount > ".$_SESSION['total_price']."-.001 and //这句是什么意思? 
               amount < ".$_SESSION['total_price']."+.001 and  //这句是什么意思? 
               date = '$date' and 
               order_status = 'PARTIAL' and 
               ship_name = '$ship_name' and 
               ship_address = '$ship_address' and 
               ship_city = '$ship_city' and 
               ship_state = '$ship_state' and 
               ship_zip = '$ship_zip' and 
               ship_country = '$ship_country'"; 


------解决方案--------------------
total_price 取值上下浮动0.001
------解决方案--------------------
在PHP中断点调试看一下 $query 的实际内容就明白了。
  相关解决方案