복붙노트

[WORDPRESS] 워드 프레스에서 선택 쿼리

WORDPRESS

워드 프레스에서 선택 쿼리

해결법


  1. 1.

    $post_id = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE (meta_key = 'mfn-post-link1' AND meta_value = '". $from ."')");
    print_r($post_id); /
    

  2. 2.

    $post_id = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE (meta_key = 'mfn-post-link1' AND meta_value = '". $from ."')");
    print_r($post_id);
    

    자세한 내용은 ... http://codex.wordpress.org/Class_Reference/wpdb

  3. from https://stackoverflow.com/questions/19493075/select-query-in-wordpress by cc-by-sa and MIT license