Download CSV file with FileZilla and MYSQL

1

I want to download a CSV file created from a query from mySQL. I want to use FileZilla but I do not know how to do it, someone to support me? I have this code.

SELECT * FROM EMPLEADOS
INTO OUTFILE 'C:\prueba.csv' FIELDS TERMINATED BY ';' ENCLOSED BY '"' LINES TERMINATED BY '\n'

But I do not want to put it in my "C: \" if not in the C: \ of the person who invoked the function. Can you support me with the configuration? Use XAMPP

    
asked by Alberto Siurob 15.11.2016 в 02:47
source

1 answer

0

You are using a request to the server, you can not invoke an ftp client in that way and you should not enter the user's data or directories without first asking permission, if you are working with a website and what you want is generate a CSV and then download it in a click what you can do is call your mysql function from PHP and the file is generated in the server path, so that in the end something like this: link and perform an event by clicking on a button with HTML to call this location that you can bring via ajax or some other way, but as I mentioned, this it's only if you're working with web, but you can not call the ftp client from a MySQL query to have it download a file, greetings!

    
answered by 08.04.2017 в 18:42