def delete_profile(db, user_id, profile_id):
    """Deletes a profile for the given user.

    Args:
        db (object): The db object
        user_id (int): The id of the user.
        profile_id (int): The id of the profile to delete.

    Returns:
        True if the record was deleted, False otherwise
    """
    db.execute('''DELETE FROM profile
                  WHERE user_id=? and id=?''',
                (user_id, profile_id))

    return not db.rows_affected == 0