A
A
airisart2015-10-02 00:16:30
PHP
airisart, 2015-10-02 00:16:30

How to select by ID in phpmyadmin?

Good evening! There are many posts in the wp_posts
table (in wordpress ), you need to upload several of them by ID , here is the list 3571,3576,3584,3589,3594,3599,3605,3610,3615,3620,3625,3664,3666,3860,3869,3891,3899,3907,3909,3919,3936,3968,4005,4014,4021, 4043.4047.4059.4067.4075.4082.4089.4091.4099.4104.4106.4109.4114.4116.4121.4123.4125.4129.4131.4135.4138.4142.4150. 4164,4177,4191,4201,4220,4230,4232,4246,4256,4277,4284,4294
In all these posts, you need to change the text and shortcodes, but UPDATE and REPLACE do not work. Therefore, I think to unload through phpmyadmin, open which thread with the editor, fix it with my hands and then update the database itself from the file. Will it work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cat Anton, 2015-10-02
@airisart

SELECT * FROM `wp_posts`
WHERE `ID` IN(
    3459, 3461, 3462, 3466, 3468, 3470,
    3525, 3531, 3536, 3541, 3546, 3553,
    3555, 3561, 3566, 3571, 3576, 3584,
    3589, 3594, 3599, 3605, 3610
);

UPDATE `wp_posts` 
SET `post_content` = REPLACE(`post_content`, 'search', 'replace')
WHERE `ID` IN(
    3459, 3461, 3462, 3466, 3468, 3470,
    3525, 3531, 3536, 3541, 3546, 3553,
    3555, 3561, 3566, 3571, 3576, 3584,
    3589, 3594, 3599, 3605, 3610
);

L
Lulzsec, 2015-10-02
@Lulzsec

UPDATE wp_posts
SET text='abcd'
WHERE id=3459;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question