WordPress SQL

WordPress SQL 指定文字数以上の記事の記事URLを取得する

WordPress上でのSQLプログラミング言語(スクリプティング言語)において、SQLのselect文で指定文字数以上の記事の記事URLを取得する方法について紹介します。800文字数以上の記事を取得する。select post_title,guid,char_length(post_content) from wp_posts where post_type…

Shou Arisaka
1 分で読める
2019年6月20日

WordPress上でのSQLプログラミング言語(スクリプティング言語)において、SQLのselect文で指定文字数以上の記事の記事URLを取得する方法について紹介します。

800文字数以上の記事を取得する。

select post_title,guid,char_length(post_content) from wp_posts
    where post_type='post'
        # AND post_status='publish'
        AND post_title REGEXP '.'
        AND post_content REGEXP '.'
        AND char_length(post_content) >= 800
        order by post_date desc
            ;      

Image

この記事をシェア

Shou Arisaka 2019年6月20日

🔗 リンクをコピー