note 64354 modified in mysql.affected-rows by danbrown
| From: | danbrown@php.net | Date: | Tue, 09 Dec 2008 05:02:05 +0000 |
| Subject: | note 64354 modified in mysql.affected-rows by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-147938@lists.php.net to get a copy of this message | ||
mysqli_affected_rows will return 0 if you run a UPDATE command with the same variables that already
exist
Here is a example
db row from 'test' table
----------
id = 1
name = test
<?php
mysqli_query($db,"UPDATE
test SET name='test' WHERE
id='1'");
$i=mysqli_affected_rows($db);
?>
$i Will Be Zero Or False
--was--
mysqli_affected_rows will return 0 if you run a UPDATE command with the same variables that already
exist
Here is a example
db row from 'test' table
----------
id = 1
name = test
mysqli_query($db,"UPDATE test SET name='test' WHERE
id='1'");
$i=mysqli_affected_rows($db);
$i Will Be Zero Or False
http://php.net/manual/en/mysql.affected-rows.php