วันพฤหัสบดีที่ 16 กุมภาพันธ์ พ.ศ. 2560

แก้ภาษาไทยใน WordPress Database ที่เป็นตัวหนังสือแบบ เด็กโข่ง

ไปเจอวิธีแก้จากที่นี่ครับ http://www.mindphp.com/forums/viewtopic.php?f=17&t=33068

ถ้าเป็นที่ table ของ WordPress ก็ใช้คำสั่งนี้

UPDATE wp_posts SET post_content = convert(cast(convert(post_content using latin1) as binary) using utf8)

ถ้าจะแก้ title ก็

UPDATE wp_posts SET post_title = convert(cast(convert(post_title using latin1) as binary) using utf8)