ok i have the following (which i fully understand)
global $wpdb; $rand_posts = $wpdb->get_results(" SELECT * FROM $wpdb->posts AS p, $wpdb->post2cat AS c WHERE p.ID = c.post_id AND c.category_id = 4 AND p.post_status = 'publish' ORDER BY RAND() LIMIT $num" );
But now the new wordpress has moved to the post2tag database fields as well as taxonomy etc i’m completely lost on how to update that (and other parts of my website) to reflect.
How does a category now link to a post ?
Can anyone offer any assistance ?
- The topic ‘replacing post2cat MYSQL commands’ is closed to new replies.