X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id F07B19FB1C0 for ; Wed, 26 Jul 2006 21:06:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 58710-07 for ; Wed, 26 Jul 2006 21:06:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from hub.org (hub.org [200.46.204.220]) by postgresql.org (Postfix) with ESMTP id 553619FA43C for ; Wed, 26 Jul 2006 21:06:32 -0300 (ADT) Received: from localhost (mx1.hub.org [200.46.208.251]) by hub.org (Postfix) with ESMTP id 3F853291B0A for ; Wed, 26 Jul 2006 21:06:26 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 59367-02; Wed, 26 Jul 2006 21:06:23 -0300 (ADT) Received: from ganymede.hub.org (blk-224-179-167.eastlink.ca [24.224.179.167]) by hub.org (Postfix) with ESMTP id 57E03291B02; Wed, 26 Jul 2006 21:05:09 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id C747E5C906; Wed, 26 Jul 2006 21:05:17 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id C66895C2E7; Wed, 26 Jul 2006 21:05:17 -0300 (ADT) Date: Wed, 26 Jul 2006 21:05:17 -0300 (ADT) From: "Marc G. Fournier" X-X-Sender: scrappy@ganymede.hub.org To: Jim Buttafuoco cc: pgsql-sql@postgresql.org Subject: Re: DBD::Pg ... how would I format this prepare? In-Reply-To: <20060726220920.M84625@contactbda.com> Message-ID: <20060726210458.I1188@ganymede.hub.org> References: <20060726182806.A1188@ganymede.hub.org> <20060726220920.M84625@contactbda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.479 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200607/326 X-Sequence-Number: 25900 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" > To: pgsql-sql@postgresql.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@hub.org MSN . scrappy@hub.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@hub.org MSN . scrappy@hub.org Yahoo . yscrappy Skype: hub.org ICQ . 7615664