Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: how to create a database in perl

by Anonymous Monk
on Jan 28, 2011 at 15:20 UTC ( [id://884858]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://884858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (None)
    As of 2024-04-25 02:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found