SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    210
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Wordpress Database SQL Help Please!

    hello all,

    Please, i need to Select all posts with a Term on the Title Then insert them to a Category, how to do that!

    at least i can Get all the Posts by using this :
    Code:
    SELECT
    post_title
    FROM wp_posts
    WHERE post_title LIKE '%CSS%'
    But how to insert this result to a specific Category !?

    Thank you in advance

  2. #2
    SitePoint Addict
    Join Date
    Oct 2008
    Location
    Virtual World is my location
    Posts
    316
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Well post WP 2.5 how categories are stored has changed. Now its stored under term_taxonomy.

    From what I understand you want a group of posts to be added to another category. So after you select you will need to then update specific term values by joining tables.

    If the number of entries is less - I guess its better you simply go to posts and modify / update the category by selecting multiple posts and at once running update.

    If you still wish to go via the database route - these posts might help you

    http://codex.wordpress.org/Database_Description
    http://codex.wordpress.org/Displayin...m_Select_Query
    FreelanceNext.com - Freelance Projects / Jobs & more...
    BargainNext.com - coupons / deals / bargains / offers & more...

  3. #3
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    210
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jaagare View Post
    Well post WP 2.5 how categories are stored has changed. Now its stored under term_taxonomy.

    From what I understand you want a group of posts to be added to another category. So after you select you will need to then update specific term values by joining tables.

    If the number of entries is less - I guess its better you simply go to posts and modify / update the category by selecting multiple posts and at once running update.
    Finally this what i did even though i had more than 2000 posts to organize! Thank you for your help


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •