Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Query Formatting

by tcf03 (Deacon)
on Dec 06, 2007 at 10:17 UTC ( [id://655347] : note . print w/replies, xml ) Need Help??

in reply to Re: Query Formatting
in thread Query Formatting

one more addition you may want to consider is setting $db->{RaiseError} or $db->{PrintError} or both.
sub dbConnect{ my ($database, $username, $password, $hostname) = @_; my $db = DBI->connect("DBI:SQLite:$database:$hostname", $username, $password) || die "Cannot connect to host database.".$DBI::errstr; $db->{RaiseError} = 1; $db->{PrintError} = 1; return $db; }
"That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
  --Ralph Waldo Emerson