-
☆ A M B ☆
- 209 Posts
I have googled around but I can't seem to find what I'm looking for. I need a cron script that will export just one table from a mysql database as excel compatible csv and email the file. Can anyone direct me? Thanks!
Ben Morrison
Hacking templates to pieces since 2003
You'll definitely need a custom snippet to do that.
This looks good for writing the CSV file:
http://www.electrictoolbox.com/create-csv-file-mysql-php/
Sending the email will depend on the version of MODX you're using. If it's Revolution, you can look at the code of the QuickEmail snippet.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 14 years, 8 months ago.]
Hi Bob
you link reaches a 404 page !
Cheers
-
☆ A M B ☆
- 209 Posts
Yep 404. I have ModX 2.2, but I was hoping this could be done outside of ModX with just a bit of php in a file as a cron job... the php forums I found online haven't been of any help
Ben Morrison
Hacking templates to pieces since 2003
Quote from: anso at Feb 06, 2012, 03:09 AMHi Bob
you link reaches a 404 page !
Cheers
Try it again. I moved it to a new line and it works for me.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/modx.html