Can anyone tell me if its possible to have PHP (via a cron job or some other method), monitor a files timestamp and when it sees that a new file has been uploaded, execute a function that uplaod the CSV data from that file inot a MySQL database?
i created a function that lets me upload the CSV file manually into SQl but now my client needs it to be fully automated so that whenever teh ftp across an updated CSv file, it gets uploaded to teh database.
have no idea how to go about this oen and would appreciate any help
Well, this shouldnt be too tricky. You just need to store the timestamp of the CSV file somewhere when you processed it and when your script is run again you compare this value with the current timestamp of the CSV file. If the file's timestamp is newer you simply copy the data into your database and update the stored timestamp.