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();
}
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.