/ Published in: SQL

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT RECENT_POSTS.*, wp_users.display_name AS AUTHOR FROM (SELECT ALL_POSTS.* FROM (SELECT POSTS.*, post_author AS author_id FROM wp_2_posts POSTS WHERE post_status = ‘publish’ AND post_type=’post’ UNION SELECT POSTS.*, post_author AS author_id FROM wp_3_posts POSTS WHERE post_status = ‘publish’ AND post_type=’post’) ALL_POSTS ORDER BY post_modified DESC LIMIT 0,20) RECENT_POSTS LEFT JOIN wp_users ON RECENT_POSTS.author_id = wp_users.ID
Comments
