Recently, a primary key in my database got messed up somehow. I ran a script to reorder the users, but now every user has the wrong private messages.
-- -- Table structure for table `fusion_messages` -- CREATE TABLE `fusion_messages` ( `message_id` mediumint(8) unsigned NOT NULL auto_increment, `message_to` mediumint(8) unsigned default '0', `message_from` mediumint(8) unsigned default '0', `message_subject` varchar(100) NOT NULL default '', `message_message` text NOT NULL, `message_smileys` char(1) NOT NULL default '', `message_read` tinyint(1) unsigned NOT NULL default '0', `message_datestamp` int(10) unsigned NOT NULL default '0', `message_folder` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`message_id`), KEY `message_datestamp` (`message_datestamp`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5618 ;
There's the table structure. As you see, there are message_from and message_to fields. I want the users to be reordered so that they go to the correct user. All I want is the numbers to be in sequential order.
For example, the users used to be
but I made them
and now I want to do it with this table.
EDIT: The corresponding numbers are:
You just have to tell me the process for converting one of them; I'll do the rest.
Like converting 3 to 2 in each one.