logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: PDO concerns: msg#00213

Subject: Re: PDO concerns
On Sun, 27 Feb 2005 17:44:38 -0600, Richard Thomas <lists@xxxxxxxxxxxx> wrote:
> First http://pecl.php.net/bugs/bug.php?id=3564
> 
> MySQL in php has always supported the use of rowCount() to return the
> number of results in a SELECT, to change this behaviour all of a sudden
> in PDO is going to cause some confusion to say the least. PDO as I knew
> it is not a "abstraction" layer but instead a common method of database
> access that is supposed to support all features of each database even if
> some features are not portable. Half the agruements for doing PDO to
> begin with that I have seen are claims that it is not a abstraction
> layer and not meant to be portable but can be at the programmers
> choice.. So why remove functionality that has always existed in MySQL
> access functions before?

This is a consequence of opting for high performance by default.
For portability, you should issue a "SELECT COUNT()" query.
For ease of use, simply use fetchAll().
 
> Next http://pecl.php.net/bugs/bug.php?id=3565
> You can not do multiple querys without declaring your $return variable
> as null hence destorying the prior object. Now this one I may be off but
> no where have I ever seen a php method act in such a manner before at
> the very least this needs some very good doc's. What confuses me the
> most, this only affects the query statement not executes which is
> inconsistant.

Think about it for a minute; you created an object that holds open a
cursor on the remote database.  You need to destroy the object (by
assigning it a null value) before you can open another cursor.

--Wez.



<Prev in Thread] Current Thread [Next in Thread>