Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Mysql error near values(

by BazB (Priest)
on Feb 04, 2006 at 23:31 UTC ( #528020=note: print w/replies, xml ) Need Help??


in reply to Mysql error near values(

DBI's do() method does not use placeholders - it's there specifically for drivers that do not support placeholders.

You should quote any strings in the SQL that you're executing.
You might want to format things a little better so that any errors are easier to find, rather than having a huge block of code (which in this case has two SQL statements).

Edit: what am I talking about? do() does support placeholders.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.

Replies are listed 'Best First'.
Re^2: Mysql error near values(
by reneeb (Chaplain) on Feb 04, 2006 at 23:37 UTC
    do does support placeholders. Have a look at http://search.cpan.org/~timb/DBI-1.50/DBI.pm#Database_Handle_Methods

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://528020]
help
Chatterbox?
[GotToBTru]: you can always have ${${${$array[0]}{ key1}}[1]}{key2}
[GotToBTru]: I think I have that inside out .. but you get the point
[choroba]: $array[0]{key1}[1] {key2}
[thepkd]: ??
[GotToBTru]: I would think temporary variables would help in making the real life meaning of your structure clear
[choroba]: the problems start when you want to "skip a level", i.e. the arrays for all the keys
[LanX]: what are temps?
[moritz]: oh, the question was about creation, not indexing
[thepkd]: temporary variables
[moritz]: [ { a => [ { b => 1 } ] } ]

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2016-12-06 13:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (104 votes). Check out past polls.