note
ColonelPanic
<p>Well, <a href="http://search.cpan.org/dist/DBI/DBI.pm">DBI</a>, Perl's
standard way of interfacing with databases, lets you do just that. You can make an SQL statement with parameters that can be set later:</p>
<code>
my $dbh = DBI->connect(...connection parameters...);
my $get_foo = $dbh->prepare("select foo from table where bar=?");
$get_foo->execute(3); #select foo where bar=3
$get_foo->execute($baz); #select foo where bar=$baz
</code>
<p>Perhaps you meant something different by constructing a query. If so, you need to specify what you mean. SQL is a whole programming language in itself.</p>
<div class="pmsig"><div class="pmsig-27571">
<br><br>When's the last time you used duct tape on a duct? --Larry Wall
</div></div>
1004473
1004473