[rt-users] Perl script to dump mysql db transactions?

Jay Christopherson jaychris47 at hotmail.com
Wed Mar 2 21:15:47 EST 2005


Try:

select * from Transactions where Created > 'DATE' AND Create < 'DATE';

Where DATE represents some timeperiod of transactions that you want 
returned.

Plug that into your perl script and you can do whatever you want with the 
data returned...

- Jay

>From: Doug Barton <dougb at dougbarton.net>
>To: Request Tracker <rt-users at lists.bestpractical.com>
>Subject: [rt-users] Perl script to dump mysql db transactions?
>Date: Wed, 02 Mar 2005 17:48:27 -0800
>
>Howdy,
>
>Under different circumstances I would not make such a naked plea for 
>assistance, however time is of the essence (when is it not?) and I'm hoping 
>that this is one of those trivial issues that someone with more experience 
>has already tackled.
>
>I'm fairly competent with Perl coding, but not much experienced in mysql. 
>What I need to do is generate a list of all the transactions (i.e., 
>activity of any sort) that have occurred in a given RT queue during a 
>specified time period. Say for example, I might want to run a cron script 
>at 12:01 am every night that dumped the previous day's transactions to a 
>text file.
>
>I can handle issues related to formatting, printing to file, etc., what I'm 
>hoping someone has handy in their tool box is the code to get mysql to 
>"tell me everything that's changed in this table between time X and time 
>Y." Or, if this is a trivial exercise if someone could point me to the Fine 
>Manual I should read, I'd be grateful for that kind of help as well.
>
>Thanks,
>
>Doug
>
>
>--
>     If you're never wrong, you're not trying hard enough
>_______________________________________________
>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
>RT Administrator and Developer training is coming to your town soon! 
>(Boston, San Francisco, Austin, Sydney) Contact training at bestpractical.com 
>for details.
>
>Be sure to check out the RT Wiki at http://wiki.bestpractical.com





More information about the rt-users mailing list