in reply to How do I use bind variable w/oracle DBD?
Check the docs :-) To make your SQL portable, it's usually better to use placeholders.
my $deptno = 20; my $sql = 'SELECT * FROM emp WHERE deptno = ?'; my $sth = $dbh->prepare( $sql ); $sth->execute( $deptno ); ...
Oracle also comes with the additional bind_param_inout() feature, but you should look at the more complete docs in perldoc DBD::Oracle for that. (I'd also recommend against using SELECT *, but that's a private matter between you and the rest of your team :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I use bind variable w/oracle DBD?
by perlknight (Pilgrim) on Feb 27, 2002 at 20:46 UTC | |
by ke6scs (Initiate) on Dec 04, 2002 at 01:35 UTC |