Issue Passing MySQL2 results back to file calling the function

visit shbcf.ru