Query posts for Specific Categoty! Please Help
-
Hi!
Im triyng to get the last 5 post, from my category with id 30 of the current day. How can i complete my query?
Thanks a lot:global $wpdb;
$today = date(‘Y-m-d’).” 0:00:00″;
$tomorrow = date(‘Y-m-d’).” 23:59:59″;$fivesdrafts = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_date BETWEEN \”$today\” AND \”$tomorrow\” ORDER BY post_date ASC”);
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Query posts for Specific Categoty! Please Help’ is closed to new replies.