how to select two meta_value wp_postmeta?
-
how to select two meta_value wp_postmeta?
by the way get_row please$id = get_the_ID(); $selecttwovalue = $wpdb->get_row("SELECT PM.meta_value, DU.meta_value FROM $wpdb->posts AS P LEFT JOIN $wpdb->postmeta AS PM on PM.meta_key = 'meta_value1' JOIN $wpdb->postmeta AS DU on DU.meta_key = 'meta_value2' WHERE p.ID = '$id'"); echo $selecttwovalue->PM;
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how to select two meta_value wp_postmeta?’ is closed to new replies.