Get actual rows affected after UPDATE
Posted: Sat Apr 03, 2010 7:48 am
Hi,
I am using the following mysql query statement:
mysql_query("UPDATE inventory SET username='$username' WHERE username='$target->username' ORDER BY RAND() LIMIT 15");
now I want to also display to the user which rows were affected by the above query and list all those rows in an echo or something.
I know i can use mysql_affected_rows() to find HOW MANY rows were affected but can you make a script that will list the rows that were affected? or is it not possible?
Regards
I am using the following mysql query statement:
mysql_query("UPDATE inventory SET username='$username' WHERE username='$target->username' ORDER BY RAND() LIMIT 15");
now I want to also display to the user which rows were affected by the above query and list all those rows in an echo or something.
I know i can use mysql_affected_rows() to find HOW MANY rows were affected but can you make a script that will list the rows that were affected? or is it not possible?
Regards