"be consistent" | |
PerlMonks |
Re: DBI execute() args in array format (or similar) possible?by snafu (Chaplain) |
on Aug 12, 2002 at 22:02 UTC ( [id://189652]=note: print w/replies, xml ) | Need Help?? |
Just so everyone knows...I was able to solve my problem with the following code-bit... I finally able to figure that since all the elements were correct, despite what some said (although, it is a good idea to check and make sure...which I do in other subroutines and I intend to do a more thorough check/match on the number of elements in the array to the num of '?' used in the query) that I should be able to pass that info onto the execute method. Anyhoo, after thinking about it and doing some tinkering, I finally got it to work out right. /me loves eval. I also took the advice by perrin and fixed my var declarations for the shift statements. Thanks again, everyone, for your input. The magic line of code that solved my problem...
The code (sub routine) altogether now:
I think I am going to run into some documentation that will assist me more in what it is I was trying to accomplish. Because, I think I read something today that looks like it is doing the same thing I was doing; calling the execute with an array with the data in it that should be executed. However, I haven't finished reading that stuff yet, so I am sticking with what I have until I get more info. Feel free to continue to correct and offer suggestions. It is quite helpful and may spark a discussion that is useful for all.
_
_
_
_
_
_
_
_
_
_
In Section
Seekers of Perl Wisdom
|
|