Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Using variables in a DBI do queriy

by vendion (Scribe)
on May 05, 2011 at 14:26 UTC ( [id://903154]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Using variables in a DBI do queriy
in thread Using variables in a DBI do queriy

This looks very interesting although I'm not quite sure I know what is going on in it, my major question is how would the hash key value pairs be correctly matched to the @data array is it set in the order that the files are read? so the first file read would match the:

{ contract => $data[1], invoice => $data[2], %common, },
and so on?

Replies are listed 'Best First'.
Re^5: Using variables in a DBI do queriy
by wind (Priest) on May 05, 2011 at 17:26 UTC

    You showed me 4 insert queries that I assumed were ran sequentially one after another. If that's the case, than the code I provided would programmatically build the same queries, but run then in a single insert statement. Someone might want to do this if they were concerned about the number of database accesses and if there was an index on the table that was updated every time an insert was performed.

    If those insert statements you showed me are not actually run immediately, one after another as shown, than my sample code is meaningless.

    Either way mate, I believe I've helped you as much as I can.

      Sorry if I was a bit unclear about my problem this script has to be able to parse through multilevel files, each query represents a different file within a directory. Over all there are three directories I have to read from, one has three files (handled by the code in my other post), one has two files, and the last directory has one file. The way I am doing it now with different queries works I was just wondering if there was a more maintainable way to do it.

      Anyways thanks for the help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://903154]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-28 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found