Hello tehre. i need your help on this.
I created a new meta_key with the name “support”. I want to list all authors that have value 1 into the “support” meta_key.
Addionaly is there any possibility to create a new different field inside MySQL, containing the ID’s of the authors with meta_value =1 , instead of just listing them ?
I have this as a sample
<?php $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'tag' AND wpostmeta.meta_value = 'email' AND wposts.post_status = 'publish' AND wposts.post_type = 'post' AND wposts.post_date < NOW() ORDER BY wposts.post_date DESC "; $pageposts = $wpdb->get_results($querystr, OBJECT); ?>
- The topic ‘Sql query to search all authors for a meta valuex’ is closed to new replies.