On Mon, 19 Jun 2006 14:31:55 +0100, Tim Bunce wrote:

Hi Tim

Thanx for the feedback. I don't delude myself into calling it peer review :-).

>> $sth_1 -> execute($_) for (1 .. 5);
>> $sth_1 -> finish();
> FYI the call to finish() isn't needed here (or in most of the other
> places you'll see it used).

I realize draining the results of a query with while/fetch does not need to be
followed by finish, but I believed this /was/ one of those 'other places'.
Learning never stops.

I do have a policy of using finish when switching from execute to fetch. I guess
that's redundant.

> Using fetchrow_arrayref() is preferable to it's old alias fetch().
> The fetch method is retained as a shorthand that's more appropriate
> when bind_columns() is being used.

I notice you don't actually say the code wrong... The reason I used fetch -
which is not my first preference - was I've seen so many programmers who I
thought knew more than I do using it without binding, that I recently began
adopting it. I'll have a rethink.

> p.s. Your style of adding spaces around the method call arrows is
> rather unusual - very few people do that.

I'm aware of that.

I like burning up machine cycles getting the parser to scan the extra spaces,
since it's the only way I can get Windows to do something even vaguely useful.

And it makes a nice contrast to the code of those who put the very same extra
spaces inside if statements, writing if ( x ) where I would use if (x). [Truely,
I did not check the source of DBI to see where you stand on this issue.]

--
Cheers
Ron Savage, [EMAIL PROTECTED] on 20/06/2006
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company


Reply via email to