[Rt-devel] User defined Action ( Data to specified Database )

Filipe Veloza fmvel at rnl.ist.utl.pt
Tue Aug 22 10:46:46 EDT 2006


Hi,

I'm trying to pass some information from RT system, to a database. I've
added the following code but I don't seem to get any row result...does
anyone have any ideias ?

use DBI;
my $dbh = DBI->connect('dbi:mysql:database','user','pass');
if (not $dbh) {
  $RT::Logger->info("Error connecting BD");
}
my $sql = "select * from table";
my $sth = $dbh->prepare($sql);
$sth->execute || 
           $RT::Logger->info("Error executing SQL : ".$sql);
my $row;
while ($row=$sth->fetchrow_array) {
 $RT::Logger->info("Row : ".$row);
}

Thanks
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20060822/70e529de/attachment.pgp


More information about the Rt-devel mailing list