Beginning of check movie in database method

query throws an exception, need to work out why