Re: PDO user question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



How are you using the number?  Probably the easiest way is to utilize PDOStatement::FetchAll() and then do a count() on that result set. 

- Mike



Sent from my iPhone

On Sep 9, 2012, at 11:42 AM, Stefan Wixfort <stefan.wixfort@xxxxxx> wrote:

> Hi Jim
> 
>> I've had some success with querying using pdo and prepared statements as
>> well.  One thing that I'm curious about is
>> 
>> How does one handle the need to get the number of rows returned by a
>> Select?  The documentation is very clear that PDO doesn't return that
>> value for a Select statement (depending upon driver?) and there were a
>> couple of solutions that made no sense to me.  There was even one that
>> did a completely separate query just to get the row count which makes
>> even less sense.
> 
> I believe you are referring to "SELECT COUNT(*)..."
> Because I couldn't find a different way I use that.
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux