vrana Thu Oct 28 04:40:55 2004 EDT
Modified files:
/phpdoc/en/reference/mysql/functions mysql-affected-rows.xml
Log:
Works with select and replace (bug #30579)
http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml?r1=1.15&r2=1.16&ty=u
Index: phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.15
phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.16
--- phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.15 Fri Feb 20
13:08:20 2004
+++ phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml Thu Oct 28 04:40:54
2004
@@ -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.