transfer_query() function for legacy domains