ant has asked for the wisdom of the Perl Monks concerning the following question:
my $sth = $dbh_conn->run_query('check_user', 'exec Mrf_Maint.check_use +r ?', $login_id);
Please note I want this sub routine to be used from several webpages/applications so I don't know how many params will be coming in for each call, therefore I pass in @_ to the execute which then binds the params automamtically for me.sub run_query { my $self = shift; my $name = shift; my $query = shift; my $sth = $self->{'_conn'}->prepare($query) || print $DBI::errstr; + $sth->execute(@_) || print $DBI::errstr; return $sth; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to call Oracle stored procedures?
by ColtsFoot (Chaplain) on Nov 01, 2006 at 09:39 UTC | |
|
Re: How to call Oracle stored procedures?
by holcapek (Sexton) on Nov 01, 2006 at 10:15 UTC | |
|
Re: How to call Oracle stored procedures?
by ant (Scribe) on Nov 01, 2006 at 16:16 UTC | |
by runrig (Abbot) on Feb 06, 2009 at 16:42 UTC | |
|
Re: How to call Oracle stored procedures?
by Mr. Muskrat (Canon) on Nov 01, 2006 at 20:34 UTC | |
by Anonymous Monk on Feb 06, 2009 at 11:55 UTC |