私は次の select query
$product_info = $this->mysqliengine->prepare("select product_id, sku from product limit 10");
$product_info->execute();
$res = $product_info->bind_result();
while($row = $res->fetch_assoc()) {
echo $row["sku"]."<br />";
}
しかし、それは致命的なエラーを表示しています
致命的なエラー:非オブジェクト上のメンバ関数fetch_assoc()を呼び出します。
回答:
回答№1は0自分をデバッグしよう
私はこれが解決することを望む
$product_info = $this->mysqliengine->prepare("select product_id, sku from product limit 10");
$product_info->execute();
$product_info->bind_result($product_id,$sku);
while($product_info->fetch()) {
echo $product_id."<br />";
}
$product_info->close();