Re: DBD::Pg ... how would I format this prepare?

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Jim Buttafuoco <jim(at)contactbda(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: DBD::Pg ... how would I format this prepare?
Date: 2006-07-27 00:05:17
Message-ID: 20060726210458.I1188@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 26 Jul 2006, Jim Buttafuoco wrote:

> try
>
> now() + (? || ' day')::interval

Perfect ... had thought of that, but put my ) after ::interval instead of
before ;(

Thx ...

>
>
> ---------- Original Message -----------
> From: "Marc G. Fournier" <scrappy(at)postgresql(dot)org>
> To: pgsql-sql(at)postgresql(dot)org
> Sent: Wed, 26 Jul 2006 18:29:32 -0300 (ADT)
> Subject: [SQL] DBD::Pg ... how would I format this prepare?
>
>> I need to do:
>>
>> NOW() + '2 day'::interval
>>
>> where 2 is a variable ...
>>
>> if I do:
>>
>> NOW() + '? day'::interval
>>
>> it, of course, takes the ? as a literal ... so is there some way I can do
>> this such that I can do the placeholder?
>>
>> Thx
>>
>> ----
>> Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
>> Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
>> Yahoo . yscrappy Skype: hub.org ICQ . 7615664
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 3: Have you checked our extensive FAQ?
>>
>> http://www.postgresql.org/docs/faq
> ------- End of Original Message -------
>
>

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Artz 2006-07-27 00:09:27 Re: Storing an ordered list
Previous Message Jim Buttafuoco 2006-07-26 22:09:48 Re: DBD::Pg ... how would I format this prepare?