0

I have a csv files which are generated by other automated machines. These csv files are then transferred to a server where my web application resides via ftp. I would like the user to upload these files into a mysql database residing on the same server or better still automate by any means the importation of these files into the mysql database. I have no idea how

  • Does https://stackoverflow.com/questions/11448307/importing-csv-data-using-php-mysql help? – Nigel Ren Jun 24 '20 at 13:19
  • 1
    Does this answer your question? [Importing CSV data using PHP/MySQL](https://stackoverflow.com/questions/11448307/importing-csv-data-using-php-mysql) – EricSchaefer Jun 24 '20 at 15:05

1 Answers1

0
  1. To store files into a mysql server physical location a)pass the csv file to a stored procedure parameter SELECT @filename -> INTO OUTFILE "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/QueryOutput.csv"

2)create a column of type longtext,blob or clob depending on the requirement a)pass the file location, b)read the data into a variable c) save it into a longtext column