Jump to content

Recommended Posts

I have many accounts on my forum. Every now and then I delete accounts that have no posted even once. So I want to merge ids so there are no gaps. Can you help?

 

UPDATE smf_arcade_favorite SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_arcade_games SET ID_MEMBER_CHAMPION = YYY WHERE ID_MEMBER_CHAMPION = XXX;
UPDATE smf_arcade_personalbest SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_arcade_rates SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_arcade_scores SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_attachments SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_collapsed_categories SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_gallery_comment SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_gallery_pic SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_actions SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_banned SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_boards SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_errors SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_mark_read SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_notify SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_online SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_polls SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_log_topics SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_members SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_messages SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_moderators SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_personal_messages SET ID_MEMBER_FROM = YYY WHERE ID_MEMBER_FROM = XXX;
UPDATE smf_pm_recipients SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_polls SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_topics SET ID_MEMBER_STARTED = YYY WHERE ID_MEMBER_STARTED = XXX;
UPDATE smf_topics SET ID_MEMBER_UPDATED = YYY WHERE ID_MEMBER_UPDATED = XXX;
UPDATE smf_tp_articles SET authorID = YYY WHERE authorID = XXX;
UPDATE smf_tp_data SET ID_MEMBER = YYY WHERE ID_MEMBER = XXX;
UPDATE smf_tp_dlmanager SET authorID = YYY WHERE authorID = XXX;
UPDATE smf_tp_shoutbox SET value5 = YYY WHERE value5 = XXX;
UPDATE smf_tp_variables SET value3 = YYY WHERE value3 = XXX;

 

XXX and YYY is the IDs.

I'm thinking I need to combine their joindate and use a while loop.

Link to comment
https://forums.phpfreaks.com/topic/195489-reordering-ids/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.