PHP 4.0 Bug #7438: mysql_affected_rows not working
| From: | juancho at metallica dot com | Date: | Tue, 24 Oct 2000 20:46:43 +0000 |
| Subject: | PHP 4.0 Bug #7438: mysql_affected_rows not working | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35893@lists.php.net to get a copy of this message | ||
From: juancho@metallica.com
Operating system: Mandrake 7.0
PHP version: 4.0.3pl1
PHP Bug Type: MySQL related
Bug description: mysql_affected_rows not working
./configure' '--with-apache=../apache_1.3.14' '--enable-track-vars'
'--enable-ftp' '--enable-trans-sid' '--disable-debug'
'--enable-magic-quotes'
<?
$conn=mysql_ponnect("localhost","user","pass");
$r=mysql_db_query("mydb","update x='y' where z='p' ",$conn);
$n=mysql_affected_rows($r);
echo "n= $n";
?>
It prints "n= " and I get this warning:
Warning: Supplied argument is not a valid MySQL-Link resource in
/mnt/clientes/sancho/html/classes/manage_users.php on line 143
but the data in the database is beeing modified by the update query. It worked fine with 4.0.1pl2
php.ini:
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_host =
mysql.default_user =
mysql.default_password =
--
Edit Bug report at: http://bugs.php.net/?id=7438&edit=1