0
我正在開發一個互聯網站點,使用php 5.3和mysql進行數據庫。php - mysqli_stmnt :: get_result相當於
當使用數據庫,線,如後:
...
$stmnt = $mysqli->prepare("Select ID from users where loginid = ?");
$stmnt->bind_param('i', $x);
$stmnt->execute();
$result = $stmnt->get_result();
有任何等效命令:$stmnt->get_result();
這是因爲我使用phplint(http://www.icosaedro.it/phplint/phplint-on-line.html)並收到編譯錯誤:錯誤:方法mysqli_stmt :: get_result()不存在
某些workarround導致某些服務器不支持$ stmnt-> get_result()的結論(否則,我不知道爲什麼代碼不能編譯)。
是否有與$stmnt->get_result()
等價的任何等價物?
謝謝:)
查詢可即:SELECT * FROM登錄其中id> 10 並返回100行,所以result-> num_rows可以返回100. 你是什麼意思關於stmnt-> fetch(); - 我把它改爲結果= $ stmnt-> get_result(),但結果仍然有0 ros($ result-> num_rows), 也$ result = $ result-> fetch_assoc()不是有效的命令。 – Eitan