and it made me realized that maybe all I need to do is create an account that no one will use and just change the user ids from 0 to 1. I would do the same for profile posts and messages. So all I would need to do is search by user id and replace it with the user ID of the new user I made. Once I do that, I can probably continue importing. The new user id will be a user called 'Guest'.
What's the query to change a user id in profile posts, conversations and messages?
This is how I change a user id and username with someone else for both posts and threads.
Got this from another thread:
Code:
UPDATE xf_post SET user_id = 1319 WHERE username ='';
UPDATE xf_thread SET user_id = 1319 WHERE username ='';
I've altered it to look sort've like what I need. Would this work? 0 is the null account of a spammer who was deleted and 599 being the Guest account I created.
Code:
UPDATE xf_post SET user_id = 0 WHERE username ='Guest';
UPDATE xf_thread SET user_id = 0 WHERE username ='Guest';
UPDATE xf_post SET user_id = 0 WHERE user_id = 599;
UPDATE xf_thread SET user_id = 0 WHERE user_id = 599;
I don't know their user name and just want to change it to Guests and since they are already a guests with 0 as their user id can I change their user id to an account I created?
What if you don't know their user name and just want to change it to Guests and since they are already a guests with 0 as their user id can you change their user id to an account you created?
So if a post is made by an account that has been deleted but their user id still shows in the database when it's not supposed to, the only way to delete that account is to do it manually. I think I already have queries for that... which leads me to my next question, how do I find a post in the database just by entering the post ID?