List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:October 26 1999 7:46pm
Subject:Re: MySQL, DBI/DBD
View as plain text  
>>>>> "MR" == Mark Russell <russellm@stripped> writes:

MR> $dbh = DBI->connect($datasource, $user, $pwd);
MR> $errstr = $dbh->errstr();

If $dbh is undef, you are dereferencing a null pointer, effectively.

The only right way to do this is:

$dbh = DBI->connect($datasource,$user,$pwd) or &Error($DBI::errstr);

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-301-545-6996
PGP & MIME spoken here            http://www.kciLink.com/home/khera/
Thread
MySQL, DBI/DBDMark Russell26 Oct
  • RE: MySQL, DBI/DBDDan Ray26 Oct
    • Re: MySQL, DBI/DBDMark Russell26 Oct
      • RE: MySQL, DBI/DBDDan Ray26 Oct
      • Re: MySQL, DBI/DBDPaul DuBois26 Oct
  • Re: MySQL, DBI/DBDVivek Khera26 Oct
  • Re: MySQL, DBI/DBDBob Kline26 Oct