On Sat, May 05, 2001 at 12:36:18AM +0200, M.W. Koskamp wrote:
>
> Hmm, I dont think you need to explain this to Tim... he wrote DBI :-).
> But the gesture is nice and shows the manual actually is clear at this
> point....
Indeed. I think it would help people in general if answers here were
given more often in terms of quoting the docs. That way...
a) the message gets across that the docs are good
and people should use them,
b) helps spot places where the docs are not so good
and people should patch them.
:)
Tim.
>
>
>
>
> > Hi Tim,
> >
> > $sth->finish
> >
> > This Indicates that no more data will be fetched from this statement
> before
> > it is either prepared again or destroyed and to allow the server to free
> up
> > any internal resources (such as read locks) currently being held. It does
> > not affect the transaction status of the session. There's no need to call
> > finish if you're about to destroy or re-use the statement handle.
> >
> > Basically use "finish" to remove resources . I hope this will help you .
> >
> > Regards
> >
> > Dan.
> >
> >
> >
> > -----Original Message-----
> > From: Tim Bunce [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 04, 2001 2:42 PM
> > To: Ken Speich
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Prepare/Finish question
> >
> >
> > On Fri, May 04, 2001 at 01:59:05PM -0400, Ken Speich wrote:
> > > Does a $sth->finish; close out a $dbh->prepare()?
> > >
> > > For example, if I do the following:
> > >
> > > $sql = "select sysdate from dual";
> > > $sth = $dbh->prepare($sql);
> > >
> > > while(1) {
> > > $sth->execute
> > >
> > > (Do some stuff here)
> > >
> > > $sth->finish
> > > }
> > >
> > >
> > > Does $sth->finish make the query go away? Do I even wanna put that in
> > > there? I want the prepared statement to stick around, because I am
> going
> > > to be running it indefinitely... if I execute it again, does the new
> > > dataset just overrun the old one?
> >
> > Is the manual unclear?
> >
> > Tim.
>
>