dqpfl2508589 2016-11-20 18:24
浏览 76

WordNet数据库上的mysql查询工作正常,只是停止工作

this query is provided by wordnet itself, and is used for retrieving word information, such as definition, examples etc from a view named dict. it was working fine for a month but now it just stopped working. beside, this query works fine in phpMyadmin!

if ($stmt = $link->prepare("SELECT lemma,pos,sensenum,synsetid,definition ,sampleset FROM dict WHERE lemma = ? ORDER BY pos,sensenum"))
{
    $stmt->bind_param("s",$Vocab);
    $stmt->execute();
    $stmt->bind_result($Lemma, $Pos, $Sensenum, $synsetid, $Def1, $Def2);
    while($stmt->fetch()) 
    {
        $output[]=array("Pos"=>$Pos,"Sensenum"=>$Sensenum,"Def1"=>$Def1,"Def2"=>$Def2, "pDef"=>'');
    }
    echo "@@*@@"; 
    print json_encode($output);
    $stmt->close();
}
  • 写回答

1条回答 默认 最新

  • doushan5222 2016-11-21 05:17
    关注

    Check return values at every method/function call and print mysqli_connect_errno(), mysqli_connect_error() and mysqli_stmt_errno($stmt) at relevant places to check for the errors.

    The database name may have changed in configuration. The user/password may have changed (if you think they are correct, then run a dummy query like select now() as c1 and see if that works.

    If the dummy query works, run your original query, but by removing where clause, and by limiting rows with limit 10 clause.

    And, if you figured it out, add that information here for future readers.

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图