WordPress.org

Ready to get started?Download WordPress

Forums

SQL command with Tags (3 posts)

  1. piginzen
    Member
    Posted 6 years ago #

    Is there a SQL command I can use to add the author name to the tags of all their posts.

    For example. If I have an author named, "David" - Is there a command that will add "David" as a tag to all his posts?

    Thanks!

  2. Kafkaesqui

    Posted 6 years ago #

    Um, not that I know of. It would require some recursiveness, in that you do not know which posts an author is attached to until after you have performed a query, but you do need to know them to add the author's name to each as a tag.

    EDIT: Perhaps someone with advanced MySQL skills can suggest something where you can store the posts (well, their IDs, as they're all you need) from an initial query to a temporary table, then read off that table in a followup query to add the tags. Sadly, I'm not that fella.

  3. piginzen
    Member
    Posted 6 years ago #

    It's ok. Thanks anyways!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags