add function of create csv from mysql