jnull Posted August 30, 2008 Posted August 30, 2008 Hi ... any suggestions on how I can run a PHP page that gets data from a MYSQL dB, puts that data into a CSV file, and then emails me that CSV and I am wanting to do this once every day .. thus a CRON job? Just don't have any idea how to create the CSV file and get it attached to an email where my big block is. Thanx for suggestions. Quote
OJB Posted August 30, 2008 Posted August 30, 2008 This will need to be a cron job yes. I had a quick google search for a mysql export to csv PHP script, I came across a few. You would have to tie in the emailing thing yourself, or find a script that can send attachments. Beware though if your database is large and you try executing a query to grab a lot of data you may end up locking your mysql tables for a long period (hence rendering your site's database unusable until the backup has finished). Also, if you try sending a large CSV file there are limits to the size of file that can be emailed from TCH servers so this may cause an issue too. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.