... author,t.name AS category FROM wp_posts AS p LEFT JOIN wp_users AS u ON p.post_author=u.ID LEFT JOIN wp_term_relationships AS tr ON p.ID=tr.object_id LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id=tt.term_taxonomy_id LEFT JOIN wp_terms AS t ON t.term_id=tt.term_id WHERE p.post_status='publish...
...taxonomy_id AS category_id FROM wp_posts AS p LEFT JOIN wp_users AS u ON p.post_author=u.ID LEFT JOIN wp_term_relationships AS tr ON p.ID=tr.object_id LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id=tt.term_taxonomy_id LEFT JOIN wp_terms AS t ON t.term_id=tt.term_id WHERE p.post_status='publish...