This piece of code has been tripping me out for the past four hours. It is deleting a row of photos by the primary ID.

I have var_dump($selectedPhoto) and it is the correct ID, a number. My code will run every time I press delete photo, get to the mysqli_stmt_store_result part and shoots out the $txtMessage, But the database does not update.

This is really weird because I have used the exact same code, with different variables on another page and it works perfectly fine.

Can you see any errors by looking at this? OR have a better way to writing the delete statement.