in reply to DBD::Oracle 's DBI binding of arrays

In addition to quote(), there's:
my $sql = sprintf("select * from tablename where username IN (%s)", join ",", +("?") x @userArray); my $sth = $dbh->prepare($sql); $sth->execute(@userArray);

Replies are listed 'Best First'.
Re^2: DBD::Oracle 's DBI binding of arrays
by andreas1234567 (Vicar) on Sep 21, 2007 at 08:37 UTC
    Do also note that runrig is using bind variables (AKA placeholders). There are many advantages of using bind variables over dynamic sql in Oracle, including performance and security.

    Read more on bind variables, hard parse and soft parse in this (oracle-base.com) article.

    --
    Andreas