how to unset default query when using custom query
-
Hello
Is there any way to unset default wp db query:
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 10
since I’m executing my custom query with
$wpdb->get_results()
?The reason is that my custom query is quite complex and I don’t need the default query which is still persist and I’d like to minimize database queries as possible.
thanks,
K.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how to unset default query when using custom query’ is closed to new replies.