in reply to Re: how to create a database in perl
in thread how to create a database in perl

ok, thanks, but if you don't give a name, how can i get the database handle to perform queries on my database once i have created it. thanks

Replies are listed 'Best First'.
Re^3: how to create a database in perl
by erix (Prior) on Jan 28, 2011 at 15:53 UTC

    You can just run "use mynewdbname" as a sql statement in do:

    $dbh->do( "use mynewdbname" )

    I don't use mysql, but I find plenty of usage of that when searching in google code with $dbh->do("use

Re^3: how to create a database in perl
by Jeppe (Monk) on Jan 28, 2011 at 15:39 UTC
    Simply disconnect(), and connect again with the name of the newly created database.