selectrow_array functions seems to die???

From: Ron Wingfield (rtwingfield_at_archaxis.net)
Date: 12/27/04


To: <dbi-users@perl.org>
Date: Sun, 26 Dec 2004 20:32:50 -0600

Here's another example of a cut of code that doesn't perform as expected. It's as if the selectrow_array() function is dying, as in (to) die.

  if (! database_exists($database)) {
          print qq(<b>Database $database </b>does not exist.<br>);
  }

  # Executing the "return" results in no display'able html code.
  sub database_exists {
          my ($dbh, $database) = @_;
          $database =~ s/([%_])/\\$1/g; # escape any special characters
          $dbh->{PrintError}=0;
          $dbh->{RaiseError}=0;
          return ($dbh->selectrow_array("SHOW DATABASES LIKE '$database'"));
  }

I put in the "PrintError" and "RaiseError" instructions as an afterthought. I always prefer to trap all signals, interrupts, etc. and handle them myself; regardless, what is the selectrow_array() function doing that is killing the generation of html code?

OTTF,
Ron Wingfield

FreeBSD 4.8 -- Apache http 2.0.28 -- MySQL client/server 4.1.7
Perl 5.8.5 -- p5-DBD-mysql-2.9004 driver -- p5-DBI-1.46

--------------------------------------------------------------------------------



Relevant Pages

  • Dictionary police
    ... I always think of dying as ... -verb 5.to impress, shape, or cut with a die. ... Based on the Random House Unabridged Dictionary, © ... 5.to impart by means of a dye: ...
    (rec.autos.makers.saturn)
  • Re: Should the tape be shown?
    ... Showing them a tape of someone dying is a great way to desensitize them ... We show actors pretending to die. ...
    (rec.martial-arts)
  • Re: Remembering Ian O.
    ... Ian was responsible for the fact that the 'Skittish Quilters of SCS' ... Dying people generally arrange to die alone by sending anyone in the ... So for some 20 minutes he questioned my wife through me, ...
    (soc.culture.scottish)
  • Re: Remembering Ian O.
    ... The Highlander wrote: ... Ian was responsible for the fact that the 'Skittish Quilters of SCS' ... Dying people generally arrange to die alone by sending anyone in the ...
    (soc.culture.scottish)
  • Re: CBS wrong about MS
    ... some day YOU will die. ... we ALL start dying once we are born,,, the countdown begins,,, the body ... death ones come in,,, teeth waiting to fall out as death nears. ... But yes defining MS as a terminal illness and then saying he knew he was ...
    (alt.support.mult-sclerosis)