|Don't ask to ask, just ask|
[Solved] Mysql DBI placeholders not workingby tunafish (Beadle)
|on Mar 17, 2015 at 03:16 UTC||Need Help??|
tunafish has asked for the
wisdom of the Perl Monks concerning the following question:
Solution: Bind variables should be an ARRAY, not an ARRAY REFERENCE. Original post follows:
It's the most bizarre thing. I've no idea what is going wrong.
I have the following code:
This fails with the error:
However, the following code works fine:
Of course, I want to use placeholders in my SQL. I've been staring at this for the past 4 hours and have no clue what's going on. I don't even know where to begin Googling. This is incredibly bizarre. Elsewhere in the code, placeholders are working just dandy.
Edited to Add: Wow, I'm a moron. The bind variables should be an array, not an array reference... and all it took for me to figure that out was RTFM. Apologies for wasting your time, dear monks. I'd delete this node if I could.