in reply to Re: DBI quoting when I don't want it to
in thread DBI quoting when I don't want it to
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: DBI quoting when I don't want it to
by mattr (Curate) on Aug 22, 2002 at 06:29 UTC |