Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^4: DBI variable argument count

by anothersmurf (Novice)
on Sep 14, 2012 at 21:53 UTC ( #993800=note: print w/ replies, xml ) Need Help??

in reply to Re^3: DBI variable argument count
in thread DBI variable argument count


I didn't know they were called placeholders until I came to this site. When I google searched for "mysql select placeholders", I discovered this:

Says: "With most drivers, placeholders can't be used for any element of a statement that would prevent the database server from validating the statement and creating a query execution plan for it."

So now I guess I need to sanitize the user input for the select statement so there is less risk of attack on that front and simply execute() with no arguments.

Comment on Re^4: DBI variable argument count
Replies are listed 'Best First'.
Re^5: DBI variable argument count
by CountZero (Bishop) on Sep 15, 2012 at 17:32 UTC
    There is no problem using placeholders as arguments in the "WHERE" part of your SQL.


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2015-11-28 21:46 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls