遇到mysqli_stmt::bind_param()
和
调用未定义的方法mysqli_stmt :: get_result()
错误
// From the SQL query that returns the top 10 most loan asset in the selected asset
$assetQuery = "SELECT asset_name, num_loan FROM asset ORDER BY asset_name DESC LIMIT 10";
// Prepare the query statement
$assetPrepStmt = $dbhandle->prepare($assetQuery);
// If there is an error in the statement, exit with an error message
if($assetPrepStmt === false) {
exit("Error while preparing the query to fetch data from asset Table. ".$dbhandle->error);
}
// Bind the parameters to the query prepared
$assetPrepStmt->bind_param("s", $assetName);
// Execute the query
$assetPrepStmt->execute();
// Get the results from the query executed
$assetResult = $assetPrepStmt->get_result();