wordpress wpdb query
-
using this code:
// http://codex.ww.wp.xz.cn/Displaying_Posts_Using_a_Custom_Select_Query $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.post_title LIKE '%hello%' AND wposts.post_type = 'post' AND wposts.post_status = 'publish' "; $pageposts = $wpdb->get_results($querystr);check result here:
http://demo.htmltiger.com/wpmovie/?page_id=8answer will be one “Hello world!” post.
but there is 8 posts with same title.at this page, total 10 time.
http://demo.htmltiger.com/wpmovie/?page_id=10
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘wordpress wpdb query’ is closed to new replies.