As you have RAND() in your query to decide what rows to UPDATE
it will be impossible to get them after the update.
RAND() makes a random slection
But you can get a list of those updated
if you run one SELECT with RAND() first.
After this you can WHILE LOOP through the result
and do the UPDATE, row by row
The first select would probably be this query:
$result = mysql_query( "SELECT * FROM inventory
WHERE username='$target->username' ORDER BY RAND() LIMIT 15" );
$update_list = array();
while( $row = mysql_fetch_array($result) ){
// do the update for each $row
// and put the username/id or whatever into $update_list
// UPDATE inventory SET ..... WHERE id=$row['id'];
$update_list[] = $row['username'];
}
echo '<pre>';
print_r( $update_list ); //TEST see those updated
?>