Filtering information with get_results
-
Hi guys! Me again XD
I’m trying to make a list of post authors, however I wish to order them by their ID numbers and also (if possible) exclude specific authors from the list.
The working code I have is this:
$authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts);
It lists all authors by their respective IDs only the order is Descending (5,4,3,2,1) instead of Ascending. Can this be done?
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Filtering information with get_results’ is closed to new replies.