CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
SHOW Databases

 



erichmusickwc
Novice

Jun 19, 2003, 2:53 PM

Post #1 of 3 (2656 views)
SHOW Databases Can't Post

This may be a silly question, but I can't seem to find an answer. How do I execute the mysql command SHOW databases via DBI.


Jasmine
Administrator / Moderator

Jun 20, 2003, 5:36 AM

Post #2 of 3 (2654 views)
Re: [erichmusickwc] SHOW Databases [In reply to] Can't Post


Code
my $sth = $dbh->prepare( 'SHOW DATABASES' ) or die "Can't prepare: $DBI::errstr\n"; 

$sth->execute() or die "Can't execute: $DBI::errstr\n";



erichmusickwc
Novice

Jun 20, 2003, 8:16 AM

Post #3 of 3 (2650 views)
Re: [Jasmine] SHOW Databases [In reply to] Can't Post

Hmm....it worked now. Before, I was having problems connecting to mysql without specifying a db to use. Maybe I was just doing something else wrong.

Oh well thanks for your help!

Erich Musick

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives