Which query to use
-
Hi,
I want to display links below each post on the startpage. Based on a list of IDs for each post. Now I use custom queries and the$get_res = wpdb->get_results($querystr, ARRAY_A)I found it more easy to work with, but is it very bad to do it this way rather than a get_posts and the post__in, performance wise?
I found a discussion about it where some argued wp_super_cache wouldnt perform as well when using custom queries.
the custom query is a simple one
$querystring = SELECT p.ID, p.post_title, date_format(p.post_date, '%d/%c') as formatted_date FROM $wpdb->posts p WHERE p.ID IN ($the_ID_list) AND p.post_status = 'publish' AND p.post_type = 'post' ORDER BY p.post_date DESC
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Which query to use’ is closed to new replies.