Jump to content


Photo

Automate Import


  • Please log in to reply
2 replies to this topic

#1 vip3r

vip3r
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 December 2005 - 08:19 PM

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?

#2 vip3r

vip3r
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 16 December 2005 - 03:00 PM

BUMP BUMP

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 23 December 2005 - 11:16 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users