Notation and Conventions

The following conventions are used in this document:

$dbh

Database handle object

$sth

Statement handle object

$drh

Driver handle object (rarely seen or used in applications)

$h

Any of the handle types above ($dbh, $sth, or $drh)

$rc

General return code (boolean: true=ok, false=error)

$rv

General Return Value (typically an integer)

@ary

List of values returned from the database, typically a row of data

$rows

Number of rows processed (if available, else -1)

$fh

A filehandle

undef

NULL values are represented by undefined values in Perl

\%attr

Reference to a hash of attribute values passed to methods

Note that Perl will automatically destroy database and statement handle objects if all references to them are deleted.

Get Programming the Perl DBI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.