Skip to content

Instantly share code, notes, and snippets.

/gist:1755216
Created Feb 6, 2012

Embed
What would you like to do?
$session->db->dbh->begin_work;
$session->db->dbh->do(qq{ CREATE TEMPORARY TABLE user_temp SELECT userId, username FROM users } );
$session->db->dbh->do(qq{ INSERT INTO user_temp SELECT 'foo', 'bar' } );
my $sth = $session->db->dbh->prepare( qq { SELECT * FROM user_temp } ) or die $DBI::errstr;
$sth->execute;
while( my $row = $sth->fetchrow_hashref ) {
warn Data::Dumper::Dumper $row;
}
$session->db->dbh->commit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.