[rt-users] A script to find certain information in the rt3 database

Vicki Stanfield vicki at progeny.com
Fri Jul 22 11:35:01 EDT 2005


Raed El - Hames wrote:

>This should n't be difficult , write a perl script ..the sql you'll need is:
>select Tickets.id from Tickets left Join Transactions on Tickets.Id =
>Transactions.TicketId left join attachments on Transaction.id =
>Attachments.TransactionId where Tickets.Subject like '%THISPHRASE%' OR
>Attachments.Content like '%THISPHRASE%';
>
>Roy
>----- Original Message ----- 
>From: "Vicki Stanfield" <vicki at progeny.com>
>To: <rt-users at lists.bestpractical.com>
>Sent: Thursday, July 21, 2005 8:28 PM
>Subject: [rt-users] A script to find certain information in the rt3 database
>
>
>  
>
>>I am wanting to write a script to directly query the mysql backend of my
>>rt3.4.1 installation. I need to pull out the meat of the tickets that
>>meet a certain requirement. For instance, I want to get ticket IDs for
>>any tickets with THISPHRASE in the title or anywhere in the history. I
>>looked in the wiki and the FAQ, and was surprised not to have seen this
>>mentioned. Is there another place I should have looked? Thanks in advance,
>>
>>Vicki
>>_______________________________________________
>>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>>Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>>    
>>
>
>  
>
I had to make a couple of changes, but basically I think that is it. It 
hasn't returned anything yet though, so I need to keep working with it. 
I never was good with JOINS. ;-)

Vicki



More information about the rt-users mailing list