次の SQL 関数があり、mysqli_stmt_bind_result の $row をデラレしました。
//get the user number per month
public function chartwaitinguservsproduct(){
$stmt = mysqli_prepare($this->connection,
"select
(Select COUNT(*) from reusematching.waitinglist_product) as COUNTP,
(Select COUNT(*) from reusematching.waitinglist_user) as COUNTU;
");
$this->throwExceptionOnError();
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
mysqli_stmt_fetch($stmt);
mysqli_stmt_bind_result($stmt, $row->COUNTP, $row->COUNTU);
mysqli_stmt_free_result($stmt);
mysqli_close($this->connection);
return $rows;
}
しかし、データベースをどのように変更しても、$rows は常に NULL です。なんで?fetchステートメントのため??