Consider this example :
$drh = DBI->install_driver("mysql");
@databases = $drh->func($host, $port, '_ListDBs');

Now the databases will be assigned into "databases" array

Regards,
eDeveloper
 ----- Original Message -----
From: "Elie De Brauwer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 31, 2001 4:16 PM
Subject: DBI question ...


> Hello,
> I have a little problem relating a program that I'm writing. This program
> involves getting data from mysql databases.
>
> According to some docs the code should be like
>
> use DBI;
> $dbh =
BDI->connect('DBI:mysql:databasename:database:host','username','pass')
> or die $DBI::errst;
>
> Now my problem is the following, in order to connect you have to know the
> databasename but I want it to be that the users get a list of possible
> databases, picks one of them and then uses that database.  So simply
putting
> a sql show database; to the screen and letting the user pick one out.
>
> BUT before connecting  you already have to know the databasename ... how
do i
> solve this ? Or can i stupidly give no databasename ?
>
> --
> <======================>
>  requiem aeternam dona eis
>
>          De Brauwer Elie
>        [EMAIL PROTECTED]
> <======================>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to