Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2004
Posts: 5
K
stranger
stranger
K Offline
Joined: Jan 2004
Posts: 5
Would there be a problem if I changed the U_Number of a user to an unused number in w3t_Users? What happened was I switched from another forum package and started using the UBB.threads database for my existing Photopost gallery. The problem was I had users who were previously registered in the Photopost user database and I wanted to retain all the images. However, now there's a user-id conflict with some of the previously registered Photopost users with users in the new UBB database. I need to do some fancy swizzling to put everything back in sync and this will involve some shuffling of U_numbers. I want to make sure this won't cause any undesirable side effects before I go off and change the database.

Yes, I have backups! <img src="https://www.ubbcentral.com/boards/images/graemlins/cool.gif" alt="" />

-K

Joined: Jun 2006
Posts: 742
enthusiast
enthusiast
Joined: Jun 2006
Posts: 742
Careful. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" /> This could cause big problems.

Here are some tips.

- No user can be user #1 - user#1 has to be the "placholder" user for anonymous users and users who have been deleted.
- If you change the usernumber in the w3t_Users table - you must change the occurance of that number in EVERY other table, because if the different scripts try to join different tables by user number, and they don't match up, then stuff will simply not appear. So if you're not careful, whole forums, or posts could disappear.
So if you change a user number in the user table, be sure to search and make the same adjustment in EVERY table that has user numbers. (Which is most of them).

For that reason, I would not recommend doing it as it could be quite complex. But if you've got backups and have a pretty decent understanding of MySQL and can understand how everything is joined together by user numbers, if you update every table that uses it, then you should be fine. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

Just so that you understand the risks involved. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />


Joshua Pettit
Web Developer
www.ThreadsDev.net | www.JoshuaPettit.com
Joined: Jun 2006
Posts: 346
J
enthusiast
enthusiast
J Offline
Joined: Jun 2006
Posts: 346
You might want to talk to Michael P. at Photopost.com and discuss a possible import from the pp database to the threads databse (users only).


--
Website Development and Management
www.jcswebdev.com
Joined: Jan 2004
Posts: 5
K
stranger
stranger
K Offline
Joined: Jan 2004
Posts: 5
Thanks Josh. So far I've identified the following tables that seem to re-use the
U_Number...

Table---------------Columns
w3t_Last--------------L_Uid
w3t_Messages-----M_Uid, M_sender
w3t_Moderators----M_Uid
w3t_Posts------------B_PosterId, B_LastPosterId

I'm unsure about these...

Table---------------Columns
w3t_Online----------O_Uid
w3t_Ratings---------R_What
w3t_Subscribe------S_Uid

It shouldn't be hard to catch all the necessary tables with a simple script. However I want to be sure I've identified all the fields I need to change. Can you take a look at this and see if I've missed anything? Many thanks.

I'll try it out on one user and if I break the database, I can always reverse the changes.

Photopost OTOH, is another matter...

[]
So if you change a user number in the user table, be sure to search and make the same adjustment in EVERY table that has user numbers. (Which is most of them).
[/]

Joined: Jun 2006
Posts: 346
J
enthusiast
enthusiast
J Offline
Joined: Jun 2006
Posts: 346
Prolly best to take this over to www.threadsdev.com, we can no longer offer editing help for the files etc.. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />


--
Website Development and Management
www.jcswebdev.com
Joined: Jun 2006
Posts: 742
enthusiast
enthusiast
Joined: Jun 2006
Posts: 742
He's not editing any of the scripts. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />

Assuming you're running 6.4.

[]

Table---------------Columns
w3t_Last--------------L_Uid [:"red"]Correct[/]
w3t_Messages-----M_Uid, M_sender [:"red"]Correct[/]
w3t_Moderators----M_Uid [:"red"]Correct[/]
w3t_Posts------------B_PosterId, B_LastPosterId [:"red"]Correct[/]

I'm unsure about these...

Table---------------Columns
w3t_Online----------O_Uid [:"red"]The online table is temp data so no worries here[/]
w3t_Ratings---------R_What [:"red"]Yes R_What holds a user number IF R_Type = u. If R_Type = t then it's a thread rating as opposed to a user rating.[/]
w3t_Subscribe------S_Uid [:"red"]Correct[/]
[/]

Additional tables

w3t_AddressBook --- Add_Owner,Add_Member
w3t_Banned ---- B_Uid
w3t_Boards --- Bo_Posterid (the last poster usernumber in each forum)
w3t_Calendar --- C_Owner
w3t_DisplayNames (if there's no display name changes in the queue, don't worry about this table)
w3t_Favorites --- F_Owner
w3t_Moderators --- Mod_Uid
w3t_PollVotes --- P_Voter

Also the U_Ignored field in the w3t_Users table will contain a list of any user numbers that particular user is ignoring.

I *think* that covers it. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


Joshua Pettit
Web Developer
www.ThreadsDev.net | www.JoshuaPettit.com
Joined: Jun 2006
Posts: 346
J
enthusiast
enthusiast
J Offline
Joined: Jun 2006
Posts: 346
[]He's not editing any of the scripts. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />

Assuming you're running 6.4.

[/]

Never assume <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />


--
Website Development and Management
www.jcswebdev.com
Joined: Jun 2006
Posts: 742
enthusiast
enthusiast
Joined: Jun 2006
Posts: 742
Who are you talking to? <img src="https://www.ubbcentral.com/boards/images/graemlins/confused.gif" alt="" />


Joshua Pettit
Web Developer
www.ThreadsDev.net | www.JoshuaPettit.com
Joined: Jan 2004
Posts: 5
K
stranger
stranger
K Offline
Joined: Jan 2004
Posts: 5
Josh, As we say in Hawaii - mahalo nui loa! (thank you very much). Now that I'm armed with enough info to wreak havoc, I'll whip up a shell script to build the needed sql statements and give `er a try. Wish me godspeed John Glenn! <img src="https://www.ubbcentral.com/boards/images/graemlins/grin.gif" alt="" />

-K

P.S. Yes, 6.4

Joined: Jun 2006
Posts: 742
enthusiast
enthusiast
Joined: Jun 2006
Posts: 742
Good luck. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


Joshua Pettit
Web Developer
www.ThreadsDev.net | www.JoshuaPettit.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 166 guests, and 137 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)