WordPress.org

Ready to get started?Download WordPress

Forums

SELECT FROM wp_posts (3 posts)

  1. Mads Phikamphon
    Member
    Posted 7 years ago #

    Aloha,

    I try to execute the following query, but I always get 0 rows back :(

    SELECT id, post_name, post_date FROM wp_posts WHERE guid = '2e9e0429-4d51-4452-a942-124e85478e30'

    There is a row in wp_posts with the specified guid, so I really don't understand why I can't retrieve it with my query?

    One other thing: What method is used to determine the post slug? I have noticed that it makes sure post slug are unique, so I would love to use that functionality in my upload script.

    Thank you.

  2. What method is used to determine the post slug?

    The function sanitize_title_with_dashes().

  3. Mads Phikamphon
    Member
    Posted 7 years ago #

    Thanks for the method name.

    I found my SQL error - it was one of the elusive error 40 that sometimes occurs if you don't focus on the right areas of the window...

Topic Closed

This topic has been closed to new replies.

About this Topic