• Resolved apnaysms

    (@apnaysms)


    How to export post from particular category id from phpmyadmin?
    i tried this query

    SELECT * FROMwp_postsWHERE 'cat_id' LIKE 38
    but its not working

Viewing 1 replies (of 1 total)
  • Use the query below;

    SELECT * FROM wp_posts p
    JOIN wp_term_relationships tr
       ON (p.ID = tr.object_id)
    JOIN wp_term_taxonomy tt
       ON (tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy='category')
    JOIN wp_terms t
       ON (t.term_id = tt.term_id AND t.term_id = 38)
    WHERE 1=1
    AND p.post_type = 'post'
    AND p.post_status = 'publish'
Viewing 1 replies (of 1 total)
  • The topic ‘How to export post from particular category id from phpmyadmin?’ is closed to new replies.