Results 1 to 4 of 4
Mar 6, 2002, 06:53 #1
- Join Date
- Jan 2002
- 0 Post(s)
- 0 Thread(s)
Number of rows that UPDATE returns
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.
Thanks for any help