Here's my connect and disconnect procedures.. the %MWSPARAM hash gets populated with the necessary database information.
sub mwsconnect { use DBI; local $server = $MWSPARAM{server}; local $db = $MWSPARAM{db}; local $user = $MWSPARAM{user}; local $passwd = $MWSPARAM{passwd}; #========================================== #make the connection #========================================== $mwsdbh = DBI->connect("DBI:mysqlPP:database=$db;host=$server" +, $user, $passwd) or &mwserror("DB Error: " . $DBI::errstr); } sub mwsdisconnect { $mwsdbh->disconnect(); }
...
Thanks!
#!/massyn.pl The more I learn, the more I realize I don't know. Albert Einstein 1879-1955
In reply to Re: Re: Can't call method "prepare" on an undefined value
by Massyn
in thread Can't call method "prepare" on an undefined value
by Massyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |