Reply To: Assign posts to author by ip?
With some luck after we work out what is going on in that other thread you won’t need to do this, that said it does need doing a simple UPDATE query is all that will be needed.
This is a good query to have a look around and see the data matches based on what the IP was of the post and the users last known IP address, this no doubt is not going to be accuate if the users IP changed from their first post to their last post and maybe every post in between.
SELECT
phpbb_posts.post_id, phpbb_posts.poster_ip, phpbb_posts.post_text,
phpbb_users.user_id, phpbb_users.username, phpbb_users.user_ip
FROM phpbb_posts
LEFT JOIN phpbb_users
ON phpbb_users.user_ip = phpbb_posts.poster_ip
It would be much better to do an update query using phpbb_posts.poster_id if your database tables are not in a mess but that won’t be known until the other thread is resolved.