Works with select and replace (bug #30579)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171438 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2004-10-28 08:40:54 +00:00
parent 17baa646f5
commit 34d972684a

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.15 $ -->
<!-- $Revision: 1.16 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
<refentry id="function.mysql-affected-rows">
<refnamediv>
@ -42,12 +42,15 @@
equal the number of rows matched, only the number of rows that
were literally affected by the query.
</para>
<para>
REPLACE statement deletes the record with the same primary key first and
then inserts the new record. This function returns the number of deleted
records plus the number of inserted records.
</para>
</note>
<para>
<function>mysql_affected_rows</function> does not work with
SELECT statements; only on statements which modify records. To
retrieve the number of rows returned by a SELECT, use
<function>mysql_num_rows</function>.
To retrieve the number of rows returned by a SELECT, it is possible to
use also <function>mysql_num_rows</function>.
</para>
<para>
If the last query failed, this function will return -1.