Re: MySQL: Return Number of Matched Rows

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

 



On Thu, Mar 25, 2010 at 9:19 PM, James Colannino <james@xxxxxxxxxxxxx>wrote:

> Yeah, the extra select is what I was hoping to avoid :-P  The MySQL
> client will return both the number of rows matched and the number of
> rows affected by the query; I was hoping perhaps the PHP API offered a
> way for me to do the same.  Ah well...  Thanks!
>

You can access data about the latest query via mysql_info()

http://php.net/manual/en/function.mysql-info.php

You can parse the string for the values you need.

There may be a more elegant solution.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux