Based on a quick perusal of the DBI source, for the function named 'quote', there's a check for a data type. It won't quote any of the following (at least in my version):
DBI::SQL_INTEGER DBI::SQL_SMALLINT DBI::SQL_DECIMAL DBI::SQL_FLOAT DBI::SQL_REAL DBI::SQL_DOUBLE DBI::SQL_NUMERIC
For all other items (for which a type is provided), it looks up the type to see if it needs quoting. If so, it slaps a single quote around it. Any single quotes (or whatever the appropriate literal prefix for that data type) found in the string are doubled.

That's also done if there's no type provided.

I've always found this to be more valuable because it helps avoid some malicious statements -- a user will have more trouble trying to drop one of my tables if his '; DROP TABLE users;' statement is quoted and treated as a literal string.


In reply to Re: Reliability of quoting via DBI placeholders by chromatic
in thread Reliability of quoting via DBI placeholders by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.