I can tell you that Date::Manip is great, but is also one of the two or three biggest modules on CPAN, if memory matters. As for quoting, maybe DATE_ADD will solve it for you?
It's the outer quotes that hurt, not so much the inner ones. I simply can't do this unless I stop using placeholders. So I need DBI to do:

INSERT INTO table (thisdate) VALUES (DATE(NOW() - INTERVAL '+1 month'));

Rather than:

INSERT INTO table (thisdate) VALUES ('DATE(NOW() - INTERVAL '+1 month')');

At least I think that's what you are hinting at being the problem that DATE_ADD might fix.

Not to mention that (AFAIK) DATE_ADD is a MySQL-specific function (I use Pg).

By the way regarding list values, why the "world of pain"?
Because before they came into the picture, the world was a simpler place. I assign arbitary attributes to arbitary table columns. The unique id for each row was the object id.

Suddenly this doesn't work for list values.

My approach has been to break any list values into a seperate table of it's own, with a non-unique key.

When you consider that in a CGI object, anything can have a list value, you can see my pain. In my new backend world I'll be putting my foot down (hard) and deciding which ones can be lists and which ones can't.

Migration is going to be ..... fun


In reply to Re: Re: DBI quoting when I don't want it to by Tardis
in thread DBI quoting when I don't want it to by Tardis

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.