public
Created

DBIx::Connector issue

  • Download Gist
gistfile1.pl
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
my $con = DBIx::Connector->new("dbi:mysql:database=$db_admin_db;host=$db_admin_server;port=$db_port;mysql_socket=$socket_path", $db_admin_user, $db_admin_password,{ RaiseError => 1, AutoCommit => 1, mysql_auto_reconnect => 0 } );
 
 
my $emails = "";
 
 
$con->run(fixup => sub {
$emails = "";
 
my $sth = $_->prepare("select distinct U.email from applications T, users U where T.application=? and T.event=? and (U.access & (1<<(T.id-1)) <> 0) and U.client_of=?");
$sth->execute($app,$type,$client_of);
 
while (my $row = $sth->fetchrow_arrayref()) {
if ($emails ne "") {
$emails .= ",";
}
$emails .= $row->[0];
}
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.