2

一些提交者提交的位置字符串太短。如何查询它们以在 phpMyAdmin 中删除它们?

查询看起来像这样(结尾显然是伪代码):

SELECT `post_id` FROM `wp_postmeta` 
WHERE `meta_key` = 'location' 
AND `meta_value` HAS LESS THAN 10 CHARACTERS
4

1 回答 1

4
SELECT `post_id` FROM `wp_postmeta` WHERE `meta_key` = 'location' AND CHAR_LENGTH(meta_value) < 10
于 2012-04-12T16:50:54.417 回答