i've problem query_posts()
call.
here code:
$results = $wpdb->get_results("select post_id " . $wpdb->postmeta . " meta_key = 'mashsb_shares' order cast(meta_value signed) desc limit 0, 20"); $top_ideas = array(); foreach($results $result) { foreach($result $key => $value) { array_push($top_ideas, $value); } } print_r($top_ideas); query_posts( array( 'post__in' => $top_ideas, 'orderby' => 'post__in' ) );
my problem posts doesn't appear in order of post__in
array ($top_ideas
).
my print_r()
shows right array, $results
's query works good. problem in query_posts()
call, can't find problem is...
thanks help!
Comments
Post a Comment