>>>>> "Steve" == Steve HOUCHEN <Steve_HOUCHEN@stripped> writes:
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 aix188.8.131.52 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> <SCRIPT language=php>
Steve> $query_string="update pagers set owner_name='Blah Blah Blah' where
Steve> print "Affected rows: ".mysql_affected_rows($db);
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.
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.