in reply to Re: Explanation of Code Problem
in thread Explanation of Code Problem

What I am trying to do is to submit a bunch of, let's say account numbers per example; I am getting values previously from another DB query and the results from this query I am doing a
push @claim,$accounts;

and trying to run my sql query on each account number found, and I am just trying to get the better and fastest way to do it.

Replies are listed 'Best First'.
Re^3: Explanation of Code Problem
by Grygonos (Chaplain) on Jan 04, 2005 at 17:22 UTC

    ITSOTIMTOWDI

    my $sql = "QUERY WHERE ?"; my $sth = $dbh->prepare($sql); foreach(@acct) { $sth->execute($_); #do some other processing }
    That would be one way to query them all individually

      I treid something like that;
      while (@array) { $element = shift @array #other processing }


      But, are you using the "?" as a place holder? How would I use the values of the @array in my $sql?

        Ok, I've tried to hand wave this enough.. give me a CLEAR explanation of where your data is coming from and where you want to put it.. then I can give you a 100% usable answer otherwise I'm just guessing