From: Michael Widenius Date: April 17 1999 8:18pm Subject: Problem with PHP 3.0.7 mysql_affected_rows(), MySQL 3.22.21 List-Archive: http://lists.mysql.com/mysql/1994 Message-Id: <14104.60477.312663.739579@monty.pp.sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "Steve" == Steve HOUCHEN writes: Steve> Hello. Steve> I am somewhat new to PHP and MySQL. I have MySQL 3.22.20a and PHP Steve> 3.0.7 working with my Apache 1.3.4 web server on Red Hat Linux 5.2 at home. Steve> However, I am trying to start using these tools on my company's intranet. I Steve> am using MySQL 3.22.21 (binary distribution for aix4.2.1.0 on powerpc), PHP Steve> 3.0.7, and Apache 1.3.6 on AIX 4.3.2 Steve> Everything I have tried so far works nicely, except for Steve> mysql_affected_rows(). The following script outputs "Affected rows: 0", Steve> even if a row has been updated: Steve> Steve> I have verified that the update happens, but mysql_affected_rows() returns Steve> 0. If I use mysql to issue update commands to the database, it returns the Steve> proper number of affected rows. Steve> This problem showed up when I started trying to use phplib-6.1 on the Steve> server at work. (It works on Linux at home.) Steve> The call to mysql_affected_rows() is returning 0 and causing a problem in Steve> the freeze() function in session.inc Steve> I would appreciate any help that you can give! I have searched archives Steve> for MySQL and PHP, and didn't find any answers to this problem. Steve> I have also posted this to the php3 mailing list. I apologize if you Steve> received duplicates. I don't know if this is a problem with my Steve> environment, PHP, or the MySQL libraries linked into PHP. Hi! When the above happens, it usually means one of the following: - One has linked the php code with ab old mysql.h include file. - One has compiled the php code with -DNO_CLIENT_LONG_LONG and the mysql code without the above flag. Regards, Monty