mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
17baa646f5
commit
34d972684a
1 changed files with 8 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue