Jump to content

Automate Import


vip3r

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?

Link to comment
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.