Mysqli is exhibiting a strange behavior. For any queries that I try the num_rows is always 0.
$email = trim(mysqli_real_escape_string($con1,$_POST['email']));
$pwd = trim(mysqli_real_escape_string($con1, $_POST['pwd']));
$result = $con1->prepare("select login.email,login.pwd from login
where email = ?");
if(!$result)
{
echo("error");
}
$result->bind_param('s',$email);
$result->execute();
print_r($result); //num_rows is zero
if($result->num_rows > 0)
{
$result->bind_result($email1,$pwd1);
$result->store_result();
while($result->fetch())
{
echo("Email: ".$email1);
}
}