0
$link = mysqli_connect("localhost", "root", "", "db");
$stmt = mysqli_prepare($link, "Call breakup_api(@inno)");
mysqli_stmt_execute($stmt);
$result = mysqli_query($link,'SELECT @inno');
$output = mysqli_fetch_row($result);
mysqli_free_result($result);
var_dump($output);
以上是調用php中的存儲過程的函數。 我能用上面的代碼執行過程,我試圖用準備好的語句轉換上面的代碼,但無法獲得上面的代碼所做的輸出。有人可以告訴我什麼是mysqli_fetch_row($ result)的等價物,而使用預準備語句。準備語句中的mysqli_fetch_row相當於
$db = new dbConnect();
$this->conn = $db->connect();
$stmt = $this->conn->prepare("Call breakup_api(@inno);SELECT @inno;");
$stmt->execute();
$stmt->close();