novosirj has asked for the wisdom of the Perl Monks concerning the following question:
I have a simple question about DBI. I have a list of names that I want to select for in a statement containing a placeholder (eg. SELECT val1,val2,val3 where val1 = ?). The list of val1 values is contained in an array. I want to loop through selecting each row like that and then print all of them out. I can find lots of examples for how to get those returned values INTO an array, but not the proper way to select based on an array of target values. There are also many more different types of execute/fetch statements now than there were when I was really playing with DBI.
Thanks for your help! Even a simple explanation of what should be in a loop and what can be done without one, etc. would be helpful.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple DBI question, select rows based on an array
by Bloodnok (Vicar) on Nov 04, 2009 at 23:10 UTC | |
by ruzam (Curate) on Nov 05, 2009 at 13:44 UTC | |
|
Re: Simple DBI question, select rows based on an array
by graff (Chancellor) on Nov 05, 2009 at 06:13 UTC | |
by novosirj (Initiate) on Nov 05, 2009 at 19:58 UTC | |
|
Re: Simple DBI question, select rows based on an array
by affc (Scribe) on Nov 04, 2009 at 22:57 UTC | |
by Gangabass (Vicar) on Nov 05, 2009 at 05:11 UTC |