I have mysqli script, Unfortunately it doesn't run on my Server with PHP 5.3.29.
As far as I can debug the server doesn't return any value for the function get_result() and the script breaks after it. Is there any know issue?
$query = "SELECT * FROM test WHERE column = ? LIMIT 1";
$stmt = $mysqli->stmt_init();
if(!$stmt->prepare($query)) echo "Failed to prepare statement\n";
else echo "prepare statement okay\n";
if(!$stmt->bind_param('s', 'test')) echo "Failed to bind parameter\n";
else echo "bind parameter okay\n";
if(!$stmt->execute()) echo "Failed to execute\n";
else echo "execute okay\n";
$result = $stmt->get_result();
if(!$result) echo "Failed to get result \n";
else echo "result okay\n";
The output would be just:
prepare statement okay bind parameter okay execute okay
Any ideas?