ok, this is fun! forensic detective work <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />

After a little experimenting I dropped the limit on your query. The result shows thousands of messages with M_Sender=2. Makes sense, those are all welcome messages the board automatically sends to new members as if it was me sending them.
Then there are lots of messages with different M_Sender id's. Makes sense too; those are private messages pple sent to eachother over time.

The problem is in the M_Uid. All messages before a certain point show M_Uid=1. After this point the M_Uid column correctly goes like 55067, 55068, 55069, 55070, 55071 ... (obviously messages to new members) with only a few M_Uid's set to 1.

Note how user 55067 registered on 21/10/2004. I upgraded on 01/11/2004. So this 'point' in the message table is not related to the moment of the upgrade, as I thought. So there must be some users with 'old' messages.

I think this isn't fixable, right? I don't see how the correct M_Uid's could be recovered, unless we use the backup of the old database... If so, I better do a DELETE from w3t_Messages WHERE M_Uid='1' AND M_Sender='2' to delete all 5722 orphaned messages, unless you can think of any side effects?