in reply to have a script autmatically create a SQL database

Here is a snippet that creates a *mysql* database:
sub create_tables { # set $dbdriver,$mysqldb,$mysqluser,$mysqlpwd # [SNIP] # Make the new database my $drh = DBI->install_driver($dbdriver); my $rc = $drh->func("createdb", $mysqldb, 'localhost', $mysqluser, $mysqlpwd, 'admin'); # Make some tables # [SNIP] }
Does that help?

-Blake

Replies are listed 'Best First'.
Re: Re: have a script autmatically create a SQL database
by lwilliams (Novice) on Sep 08, 2001 at 19:39 UTC
    What will happen if the DB already exists??