Jochem - that code worked (with some minor adjustment)! Thanks!
Now, to up the level of complexity a bit. currently it outputs like so: userid1 cardid1 cardid2 . . . userid2 cardid1 cardid2 In other words it lists the other users with matching cards and then below each user it lists the cards themselves. Now, not every user will have the same number of matching cards - some will be a 'better trade' than others. How would I go about re-ordering this list so it is displayed in the same format, but in order with the user having the most 'matches' first, then the next user, then the next, and so on descending to the users with only a single match? I was thinking a query of queries, but since we're actually ordering in the output I think the 're-ordering' would need to be done in the output as well? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187845 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

