Jump to content

Archived

This topic is now archived and is closed to further replies.

vip3r

Automate Import

Recommended Posts

I have this problem, I have a working MySQL database that is compiled from a text file. New information arrives every hour or sooner via ftp in the form of a new csv text file. I can only get the information via a text file no other way is possible since it comes from an old legacy app. The problem is the webserver and mysql server are on two different systems. I don't have access to the OS to run any crons, I have access to the http direct and to the mysql prompt on the mysql server. I have a php script that will load the text file into the mysql database. How can I automate this script and how can I have the script not update if the csv file is the same?

Share this post


Link to post
Share on other sites

I'm not sure how you're going to get around the cron requirement -- I don't even think that you can make system calls with UDFs. Maybe you can rig it up via a third server which has access to both of the other ones?

 

However, you could easily check the timestamp and/or filesize on the csv file being dumped via FTP to confirm that it's new.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.