I'm getting the following error message in my PHP script;
mysqli_stmt_bind_param(): Number of variables doesn't match number of parameters in prepared statement
But here is the relevant code:
$con = mysqli_connect( $db_url, $db_user, $db_pwd, $db );
$sql = "SELECT * FROM problems WHERE mrn=?";
$stmt = mysqli_prepare( $con, $sql );
mysqli_stmt_bind_param( $stmt, 'i', $sent_mrn );
It points me to the last line there. Am I missing something really obvious? There is only one parameter in the SQL query and I'm binding only one variable! (I know some people will suggest I use PDO, but I gotta use mysqli at the moment)