a download script of large search results to mysql that appears to work