Why don't you send a bit of your code?
What exactly isn't working? Are you not getting any results,
or are the prepare/execute methods failing?
When you use the '?' placeholder, you don't need to quote
your arguments--the placeholder handles the quoting for
you. Perhaps this is the problem?
use DBI;
my $dbh = DBI->connect('foo', 'bar', 'baz', 'Oracle')
or die "Can't connect: ", $DBI::errstr;
my $sth = $dbh->prepare("select first_name from people where last_name
+ = ?")
or die "Can't prepare: ", $dbh->errstr;
my $last_name = "Bar";
$sth->execute($last_name);
my $first_name;
$sth->bind_columns(undef, \$first_name);
while ($sth->fetch) {
print $first_name, "\n";
}
|