This is a discussion on What is more efficient - using mysql_num_rows or COUNT(key) -php+mysql within the MySQL Database forums, part of the Database Forums category; As in the subject - what is more efficient way to get number of affected rows - using mysql_num_rows or just ind ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
As in the subject - what is more efficient way to get number of
affected rows - using mysql_num_rows or just ind the query SELECT COUNT(key) FROM tabale WHERE='conditions'? Which one is quicker? Best regards, Krzysiek |
|
|||
|
On 14 Jan, 08:39, krzys <kr...@iarp.pl> wrote:
> As in the subject - what is more efficient way to get number of > affected rows - using mysql_num_rows or just ind the query SELECT > COUNT(key) FROM tabale WHERE='conditions'? Which one is quicker? > > Best regards, > Krzysiek mysql_num_rows will not give you a number of affected rows. Rows are "affected" by running a INSERT, UPDATE, REPLACE or DELETE query (two of which do not take a WHERE clause). mysql_num_rows is a side efect of runing a SELECT query. SELECT queries do not "affect" rows. |