None of my prepared statements are working, including this one:
$sql = “SELECT ****, **** FROM **** ORDER BY **** DESC;”;
$stmt = mysqli_stmt_init($conn);
if (!mysqli_stmt_prepare($stmt, $sql)) {
header(“location: …/index.php?error=stmtfailed”);
exit();
}
mysqli_stmt_execute($stmt);
Every time, !mysqli_stmt_prepare($stmt, $sql) = true. There is no problem with the database connection.
What is going on?