Hi,

I am setting up a scheduled PHP script to run every night.
It UPDATEs a table like

"UPDATE table SET active=0 WHERE to_days(date) < to_days(now() -interval 60 day)";

ie. deactivate the rows that are older than 60 days.

My problem is that I wish an email to be sent informing the recipient how many rows were changed - and possibly to put this figure into a table for future stats.

The MySQL manual says
UPDATE returns the number of rows that were actually changed. In MySQL Version 3.22 or later, the C API function mysql_info() returns the number of rows that were matched and updated and the number of warnings that occurred during the UPDATE.
but I can't find a PHP way to get this number.

Thanks for any help