duanken7168 2015-11-19 11:06
浏览 175
已采纳

Mysqli查询结果返回空,但不应该

I run the query directly through PHP MyAdmin and it returns 1 result. Am I missing something? Well clearly I must be and I can't wrap my head round it!?!

I think I'm just tired or something! Any help would be much appreciated:-

$query_road_tax = mysqli_query($conn011, "SELECT * FROM road_tax_pricing WHERE (tax_from_co2 <='$vehicle_co2' AND tax_upto_co2 >='$vehicle_co2'");
$row_road_tax = mysqli_fetch_assoc($query_road_tax);
$Six_Month=$row_road_tax['tax_6month'];
$Twelve_Month=$row_road_tax['tax_12month'];
  • 写回答

2条回答 默认 最新

  • dongyong1942 2015-11-19 11:14
    关注

    Closing ) and " issue it would be

    $query_road_tax = mysqli_query($conn011, "SELECT * FROM 
    road_tax_pricing WHERE (tax_from_co2 <='$vehicle_co2' AND tax_upto_co2 >='$vehicle_co2')");
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比