|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
automating import of csv to mysql
i have a csv file local to my pc, i need to import this comma delimited csv automatically to my mysql database on my web server,
i now think??? i need a php script that i can run as a cron job on my web server, this would automate the process and i could have a refresh button on the website to refresh the page automatically i thought i could schedule a ftp program to upload the csv file to the web server but there's a problem,, iam no good at php, can any help me???? |
|
#2
|
|||
|
|||
|
I think you want the fgetcsv php function (http://us4.php.net/fgetcsv)
That will get you an array containing a row of the CSV file. Using this, you should be able to create a text output of an insert statement for each row read from the CSV file. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > automating import of csv to mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|