MySQLi Prepared Statements are Unbuffered result set by default which means we can not use the num_rows unless we explicitly create a buffered result set by using $stmt->store_result();.
In my case I just need to use the $stmt->num_rows to make sure that there is a result comming from database. so I used something like
if($stmt->num_rows > 0){
while($stmt->fetch())
{
echo '<li>'.$name.'</li>';
}
}else {
echo "No Such a Data";
}
now my question is if I would not like to change the unbuffured query to buffered one what is the alternative method to check there is a result in the database server?