Re: bind_param_inout

From: Steven Lembark (lembark_at_wrkhors.com)
Date: 10/21/04


Date: Thu, 21 Oct 2004 12:51:40 -0400
To: dbi-users@perl.org


> I wonder ... how about adding a method bind_params() like this:
>
> sub bind_params {
> my $sth = shift;
> my $pos = (ref($_[0]) ? 1 : shift);
> for my $param (@{$_[0]}) {
> $sth->bind_param($pos++, $param);
> }
> }
>
> So that this could be shortened to
>
> $sth->bind_params(\@execute_args); # default position is 1
> $sth->bind_param_inout($#execute_args+1,\$new_id,38);
>
> I know I can have the loop in the script, but this looks kinda more
> readable to me.
>
> Sorry if this was already rejected ;-)

I've already posted a working version of this to the list,
if you like I can send you a copy to test.

-- 
Steven Lembark                                       85-09 90th Street
Workhorse Computing                                Woodhaven, NY 11421
lembark@wrkhors.com                                     1 888 359 3508


Relevant Pages

  • Re: Loop for only 10 cycles
    ... I will not comment on other issues, but altered your script ... I'm concerned that it will get caught in a never ending loop ... > Drive, intDrive, intTry, intTryMax ... > Sub QDRIVE ...
    (microsoft.public.windows.server.scripting)
  • Re: Syntax Problem...
    ... >> I'm tring to write a script that verifies if the time of the last ... sub Check_Mod ... But it runs in an infinite loop that I would only like to run every 60 ... Do I have the sleep function in the correct place, ...
    (comp.lang.perl.misc)
  • Re: reload the vbscript itself within a vbscript
    ... Loop ... >> input is less than 1 character long, the script will reload. ... >> However, the problem is that it is sub procedure, the sInputUserDept is ...
    (microsoft.public.scripting.vbscript)
  • RE: OWA usage analysis script
    ... I'll just keep this script updated on PSC ... > sub processfile ... > Hits Long, TS DateTime)" ...
    (microsoft.public.exchange2000.clients)
  • Loop for only 10 cycles
    ... The script below works great for mapping over a VPN and uses an .htm page to ... I'm concerned that it will get caught in a never ending loop when ... it's mapping the drives if it's unable to find the drive. ... Sub QDRIVE ...
    (microsoft.public.windows.server.scripting)