PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am trying to upload a data file rabc.csv in a table rabc.csv of my database using PHPmyAdmin. The file rabc.csv resides in the folder htdocs/p/dataFiles/rabc.csv and was uploaded using 'put files' in dreamweaver. I am receiving an error on PhPAdmin. Can anyone please give me an idea what is this error about?
Error:
MySQL said:
#13 - Can't get stat of '/var/lib/mysql/htdocs/p/dataFiles/racl.CSV' (Errcode: 2)
The file doesn't exist. Look at the path in the error message; seems unlikely that's where you uploaded it. Try using an absolute path rather than a relative one, or just use the file upload in the phpMyAdmin GUI.
LOAD DATA INFILE'http://mywebsite.com/p/dataFiles/rabc.csv' INTO TABLE rabc ?????
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n' IGNORE 1 LINES ;
I won't be able to use this path if my folders are protected.
PhpMy Admin worked on the remote server. This is what I am going to use from now. Thank you.
I have read articles and tutorials online about uploading .csv files in a table. Most of the articles or tutorials that I found, explained how to upload a file as a field of a table NOT as inserts in a table.