DBI Methods

With DBI installed, a number of methods are now available through Perl. Every Perl script that uses DBI must include the following line before it tries to use any DBI methods:

use DBI;

You can then invoke a DBI method using the general format:

$var = DBI->method ($parameters, ...)

or with reference to a handle as well as a method:

						$var = handle->method ($parameters, ...)

Note

It's important that you understand what is meant by the terms handle, object, and method.

A handle is a pointer variable that points to a data structure (or object). The object will typically be a database or a statement object (say a resultset from a query), and you can think of the handle as a convenient way of getting hold of that object when you want ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition 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.