SQL_DATE probably still needs to be quoted. I do not know in MySQL specifically but in PostgreSQL when you send a date in a query it has to be quoted. SQL_INTEGER will tell DBI not to quote it (in PgSQL) and I would think everywhere else so it will work. It does seem kind of 'workaroundish' (makes up a word) though. Maybe a comment to that effect?

The only other way that comes to mind quickly (which isn't as efficient, unless you do lots of inserts and want the same date) would be to select Now() and save the properly formatted 'now' and use that string for inputs which would be quoted.


In reply to Re: DBI placeholders, bind_values, and SQL_DATE by dga
in thread DBI placeholders, bind_values, and SQL_DATE by christopherbarsuk

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.