0

I have a php code with echos to check where it stops (it doesn't crash but stops sending echos and doesn't work as expected)

$stmt=$conexion->prepare("SELECT Email, MaxActiv FROM `Keys` WHERE ProdKey = ?");
$stmt->bind_param('sss', $varKey);
$stmt->execute();
echo "before";
$stmt->store_result();
echo "middle";
$resultado = $stmt->get_result();
echo "later";
$row = $resultado->fetch_assoc();
echo "then";
$aa = $row["Email"];

it stops before echo "later"; so it must fail on get_result();

Makyen
  • 31,849
  • 12
  • 86
  • 121

1 Answers1

0

There are two possible reasons:

  1. Mysqlnd is not installed for your system, which makes get_result() unavailable. You have to install php-mysqlnd.
  2. You cannot use both get_result() and store_result() at a time. Take out store_result call from the code.
Your Common Sense
  • 156,878
  • 40
  • 214
  • 345