I am having an issue trying to get the number of rows from a prepared statement query in php, my query looks as follows:
$DBH = getDBH();
$stmt = $DBH->prepare("SELECT info FROM list WHERE tag = ?");
$stmt->bind_param("s",$tag);
$stmt->execute();
$stmt->bind_result($information);
and i basically just want to say if there is no result returned display “no result returned” can anyone please help?
You need to use
$statement->store_result()first. Using your code: