Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How can i avoid backslashing special characters in DBI select statements?

by valavanp (Curate)
on Jun 17, 2006 at 15:01 UTC ( [id://555975]=perlquestion: print w/replies, xml ) Need Help??

valavanp has asked for the wisdom of the Perl Monks concerning the following question:

How can i eliminate putting reverse slashes for special characters in select query statements.

2006-06-17 Retitled by g0n, as per Monastery guidelines
Original title: 'DBI'

Replies are listed 'Best First'.
Re: How can i avoid backslashing special characters in DBI select statements?
by borisz (Canon) on Jun 17, 2006 at 15:14 UTC
    Use placeholders in your queries.
    Boris
Re: How can i avoid backslashing special characters in DBI select statements?
by Fletch (Bishop) on Jun 17, 2006 at 15:12 UTC

    Erm . . .

    A) Go read How (Not) To Ask A Question now before posting another incomprehensible question.

    B) You either need to read about the different quoting operators in perlop if you're backwhacking "s or 's, or you're trying to ask about placeholders which are covered in the DBI documentation. But your question is so vague and those are only enormously wild guesses so who knows (again, see point A above).

Re: How can i avoid backslashing special characters in DBI select statements?
by monkey_boy (Priest) on Jun 17, 2006 at 15:54 UTC
    $dbh->quote($string_with_special_charactors);


    This is not a Signature...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://555975]
Approved by grinder
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2024-03-28 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found