Re: &main::execute undefined? - Mailing list pgsql-general

From Mike Beachy
Subject Re: &main::execute undefined?
Date
Msg-id 20021121192034.GA1207@marketdude.com
Whole thread Raw
In response to &main::execute undefined?  (Andrew Magnus <xanadian99@yahoo.com>)
List pgsql-general
On Thu, Nov 21, 2002 at 10:46:09AM -0800, Andrew Magnus wrote:
> Thanks, but it still doesn't work. :-(
>
> For everyone else, the error I'm getting is:
>
> Undefined subroutine &main::execute called at ./test.pl line 10.
>
> where line 10 is:
>
> $statementH = execute() || warn $statementH->errstr ;

You need to read the documentation for DBI.  What Oliver's terse example
was saying is that you are using the wrong syntax. execute() is a
statement handle method, not a method for creating a statement handle.

Read the docs - perldoc DBI

mike

>  Oliver Elphick <olly@lfix.co.uk> wrote:
> $statementH->execute() || warn $statementH->errstr ;
> $relname = $statementH->fetchrow_array();
> $statementH->finish();

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Welcom & a problem
Next
From: Tom Lane
Date:
Subject: Re: Selecting distinct records