[Rt-devel] [rt-users] Custom SQl - RT Handle

Simon Lane slane at cedvalinfo.com
Wed Jun 17 12:51:08 EDT 2009


I am sure this may be a little basic for the developers list, but no-one on
the users' seems to have any idea...

 

In RT 3.6.4, I had the following example working well for a direct SQL
query:

 

my $dbh = $RT::Handle->dbh; 
my $query_text = $some_specific_direct_query; 
my $cursor = $dbh->prepare($query_text); 
$cursor->bind_columns( undef, \$ticket_id); 
$cursor->execute(); 
while ($cursor->fetch())

..

 

I believe that the $RT::Handle is no longer working no that we upgraded to
3.8.3.  I thought that the solution might be:

 

my $dbh = $RT->DatabaseHandle;

..

 

But I get :  

 

Global symbol "$RT" requires explicit package name

 

Which I did not get before. I have tried some variations on the above, but
don't seem to get anywhere.  

Anyone have any ideas ?

Thanks.

 

-- 

Simon Lane

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20090617/bf21d972/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4257 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20090617/bf21d972/attachment.bin 


More information about the Rt-devel mailing list