Re: PDO API (was: pdo: binding variables supplied to execute() is NotVeryUseful(tm)...)
| From: | Wez Furlong | Date: | Mon, 25 Apr 2005 15:15:24 +0000 |
| Subject: | Re: PDO API (was: pdo: binding variables supplied to execute() is NotVeryUseful(tm)...) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16077@lists.php.net to get a copy of this message | ||
On 4/25/05, Lukas Smith <lsmith@php.net> wrote:
> I also noticed that bindParam() and bindColumn() are 1-indexed, which
> will raise inconviniences with people using arrays for example to stored
> the numeric indexes
Passing an array with numeric indices to execute() expects 0 based
indices, to cater for this case. Manually calling a bind function
expects 1 based indices, as this is the convention for the majority of
database APIs.
> Beyond that rowCount() is more traditionally affectedRows() etc which
> needlessly break with existing method names in both php core extensions
> and PEAR packages.
Look, PDO is new. It's not breaking anything. Stop claiming that it
is breaking things; it doesn't touch your code; it doesn't change the
external API of your code. It doesn't make MDB, PEAR DB or any other
code change its names. It's just different. Deliberately.
> How about sitting down together at php|tropics
Sure.
> (I didnt plan on going to
> a'dam .. dunno about you Wez .. but if necessary I will travel to a'dam
> for a day)
That's a hell of a commute for me.
> and simply going through each of the methods one by one.
> Looking at what kind of methods names we currently are using for the
> same or similar things in any of the current projects on php.net and
> make any adjustments then?
Maybe, but I don't see a compelling reason to change the names, or I
would have done it already.
--Wez.