How to convert sql statement from pre-2.3 database structure
-
I am upgrading a wordpress 2.2 to 2.9.1 and need to update some of my custom coding to reflect the new database structure. Can someone help me understand the new structure? I am trying to pull posts that are only from a specific category. In the past I would do something like this…
SELECT wp_posts.*, wp_post2cat.* FROM wp_posts INNER JOIN wp_post2cat ON wp_posts.ID = wp_post2cat.post_id WHERE wp_posts.post_status = ‘publish’ AND wp_post2cat.category_id = ‘3’ ORDER BY post_date DESC
How would I accomplish this in the current version.
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to convert sql statement from pre-2.3 database structure’ is closed to new replies.