Re: DBD::Pg and date operations

2001-06-06 Thread Ronald J Kimball
On Wed, Jun 06, 2001 at 10:43:52AM -0400, Jeff Boes wrote: > > I have a date expression in a scalar like this: > > $mydate = q!timestamp 'today' - interval '30 days'!; > > I want to execute a statement like this: > > $stmt = $dbh->prepare('SELECT * FROM foo WHERE date_added > ?'); > $stmt->exe

DBD::Pg and date operations

2001-06-06 Thread Jeff Boes
I have a date expression in a scalar like this: $mydate = q!timestamp 'today' - interval '30 days'!; I want to execute a statement like this: $stmt = $dbh->prepare('SELECT * FROM foo WHERE date_added > ?'); $stmt->execute($mydate); DBD::Pg reports that the date is invalid. But if I change thi