Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: nfmovil on April 21, 2016, 01:37:28 AM

Title: Find and Change and id number on messages table.
Post by: nfmovil on April 21, 2016, 01:37:28 AM
Hi, accidentally I delete my own account, the admin account with almost 900 messages.
So, with a backup file of the database I restore my account, now i am admin again but, all the messages now say that they are created by a Guest.

I need find in a Table the name NF Movil and replace Member ID to 4 because now is 0.

Example:

INSERT INTO `smf_messages` (`id_msg`, `id_topic`, `id_board`, `poster_time`, `id_member`, `id_msg_modified`, `subject`, `poster_name`, `poster_email`, `poster_ip`, `smileys_enabled`, `modified_time`, `modified_name`, `body`, `icon`, `approved`) VALUES
(20, 19, 21, 1447297993, 4, 20, 'Nokia 610 SIM', 'NF Movil', '', '167.61.84.5', 1, 0, '', '', 'xx', 1),
(21, 20, 22, 1447298203, 0, 21, 'Motorola V3 Microfono', 'NF Movil', '', '167.61.84.5', 1, 0, '', '(//)', 'xx', 1),

Post 20 is ok, id_member is 4
Post 21 is bad, id_member is 0

How can i change all 0 to 4 when poster_name is NF Movil ?

BR
Title: Re: Find and Change and id number on messages table.
Post by: nfmovil on April 21, 2016, 03:56:26 AM
Fixed, u can close this post.

http://www.smfsimple.com/index.php/topic,10780.0.html
Title: Re: Find and Change and id number on messages table.
Post by: Irisado on April 21, 2016, 04:52:58 AM
http://www.simplemachines.org/community/index.php?topic=545266.0

You have an identical topic in the Spanish board.  Please avoid cross posting in the future.  Topic locked.