Query Know How
September 13, 1999
The basis of the previous section, A Simple Query, may
be all you need to know to generate SQL queries and receive
the results. Because SQL is a programming language in its own
right, our technique essentially boils down to using one
programming language (Perl) to send the code of another
language (SQL) to an interpreter, and turning back to Perl to
receive and process the results. So, even a complex SQL query
can be sent and processed with simple Perl code, since most
of the effort takes place inside the database engine.
In our example query script we used a simple technique for
retrieving the returned data: dump each row into an array.
For many applications this works perfectly well. But there
are some alternative capabilities of DBI that you may find
helpful in receiving database results.
A Simple Query
The Perl You Need to Know
Where We Stand
|