Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: execute failed: called with 2 bind variables when 0 are needed

by afoken (Parson)
on Dec 11, 2013 at 19:54 UTC ( #1066697=note: print w/ replies, xml ) Need Help??


in reply to Re: execute failed: called with 2 bind variables when 0 are needed
in thread execute failed: called with 2 bind variables when 0 are needed

change $sth->execute(1, 10); to $sth->execute();

Please don't. Placeholders prevent SQL injections and allow caching of prepared statements, so:

  1. Change the value "E" in $sql to a single, unquoted ?
  2. Change the execute parameters to ("E")

More information: DBI, Bobby Tables, Re: Counting rows Sqlite, Re^2: Massive Memory Leak, Re^5: Variable interpolation in a file to be read in.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re^2: execute failed: called with 2 bind variables when 0 are needed
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-04-21 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls