in reply to Centralized DSN Switch Script (MySQL)
And here's the output:#!/usr/bin/perl use DBI; $database = "qsrsubs"; require '/home/sites/jdb.cgi'; print "DBH = $dbh\n"; print "DSN = $dsn\n"; $cmd = "show variables"; $sth = $dbh->prepare($cmd); $sth->execute(); while (@ary = $sth->fetchrow_array) { print "PORT = $ary[1]\n" if grep(/port/, @ary); }
{jason@www home}$ /home/sites-dev/home/dbtest.pl
FILENAME = /home/sites-dev/home/dbtest.pl
DBH = DBI::db=HASH(0x816603c)
DSN = DBI:mysql:database=qsrsubs;port=3308
PORT = 3306
arg - this baffles me!
Jason
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Centralized DSN Switch Script (MySQL)
by Anonymous Monk on Nov 02, 2001 at 12:26 UTC | |
by lucs (Sexton) on Nov 02, 2001 at 12:33 UTC |