Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: DBD::SQLite select syntax problem

by gmax (Abbot)
on Feb 12, 2004 at 23:31 UTC ( #328686=note: print w/ replies, xml ) Need Help??


in reply to DBD::SQLite select syntax problem

Your $key_sel is not quoted.

Use $dbh->quote($key_sel) before executing, or better yet, use placeholders.

my $cmd = "select * from info where key = ?"; my $sth = $dbh->prepare($cmd); $sth->execute($key_sel);

For an explanation of your error, see "common pitfalls" in this tutorial.

 _  _ _  _  
(_|| | |(_|><
 _|   


Comment on Re: DBD::SQLite select syntax problem
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-06 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (69 votes), past polls