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 C35B79FB1B8; Wed, 26 Jul 2006 19:10:30 -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 27921-03; Wed, 26 Jul 2006 19:10:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from amanda.contactbda.com (ipn36372-e65122.cidr.lightship.net [216.204.66.226]) by postgresql.org (Postfix) with ESMTP id 5C8939F9F73; Wed, 26 Jul 2006 19:09:50 -0300 (ADT) Received: from amanda.contactbda.com (amanda.contactbda.com [192.168.1.2]) by amanda.contactbda.com (8.12.11/8.12.11/Debian-3) with ESMTP id k6QM9m3R021863; Wed, 26 Jul 2006 18:09:48 -0400 From: "Jim Buttafuoco" To: "Marc G. Fournier" , pgsql-sql@postgresql.org Reply-To: jim@contactbda.com Subject: Re: DBD::Pg ... how would I format this prepare? Date: Wed, 26 Jul 2006 18:09:48 -0400 Message-Id: <20060726220920.M84625@contactbda.com> In-Reply-To: <20060726182806.A1188@ganymede.hub.org> References: <20060726182806.A1188@ganymede.hub.org> X-Mailer: Open WebMail 2.41 20040926 X-OriginatingIP: 68.171.253.205 (jim) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200607/325 X-Sequence-Number: 25899 try now() + (? || ' day')::interval ---------- 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 -------