2016-04-05 16 views
1

bulundu tablomda, post_content adında bir sütun var. Bu sütunu <!--nextpage--> tüm örnekleri için aramak ve varsa, şeridi aramak istiyorum. Aşağıdaki bir post_content üste bulunursaSütun içinde terim için mysql tablosunu ara, şerit terimi

Yani, örneğin,:

helloworld lorem 

Hangi SQL sorgusu çalıştırabilirsiniz:

hello<!--nextpage-->world lorem 

Sonra soyunmak?

+0

GÜNCELLEME SET POST_CONTENT = DEĞİŞTİR Wp_posts (POST_CONTENT, '' '<- - nextpage!>'); –

cevap

4
UPDATE wp_posts 
SET post_content = REPLACE(post_content, '<!--nextpage-->', '') 

veya

UPDATE wp_posts 
SET post_content = REPLACE(post_content, '<!--nextpage-->', '') 
WHERE post_content LIKE '%<!--nextpage-->%' 
+1

Sütunun bu değere sahip olup olmadığını görmek için 'where' eklemeniz gerekir. –

+0

@GordonLinoff - bu doğru mu? – Sinto