in reply to Re: How to find MySQL database exist or not
in thread How to find MySQL database exist or not
code will print "Table exist" whether the database exist or not. Please help.use DBI; eval { $dbh = DBI->do('dbi:mysql:xxxxxxx','root','') or die "Connection Error: $DBI::errstr\n" } ; if (defined $dbh) { print "Table does not exist.\n"; } else { print "Table exist";}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to find MySQL database exist or not
by Marshall (Canon) on Sep 03, 2011 at 04:06 UTC |