douchuitang0642 2012-01-16 12:07
浏览 30
已采纳

mysql_num_fields():提供的参数不是时间戳大于的有效MySQL结果资源

mysql is outputting this error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=> '0000-00-01'' at line 1

here is my code

 foreach($tables as $table)
  {
    //SELECT Everything from the table in use
    $sql = "SELECT * FROM `".$table."` WHERE `timestamp` => '".$offline_time."'";
    $result = mysql_query($sql);
    echo mysql_error();
    //Return Number of fields/colulms in the table.
    $num_fields = mysql_num_fields($result);
  • 写回答

2条回答 默认 最新

  • douxin20081125 2012-01-16 12:10
    关注
    
    //change : WHERE `timestamp` =>  to
    WHERE `timestamp` >= 
    
    

    Hope it works

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了