-
-
Save brandonjjon/f57de19fc823b119fecdee3c2767e942 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SQL_CALC_FOUND_ROWS DISTINCT wpit_connections.*, CASE `entry_type` WHEN 'individual' THEN `last_name` WHEN 'organization' THEN `organization` WHEN 'connection_group' THEN `family_name` WHEN 'family' THEN `family_name` END AS `sort_column` FROM wpit_connections INNER JOIN wpit_connections_meta ON ( wpit_connections.id = wpit_connections_meta.entry_id ) WHERE 1=1 AND wpit_connections.visibility IN ( 'public', 'private' ) AND wpit_connections.status = 'approved' AND ( wpit_connections_meta.meta_key = 'wabw_wall_of_honor' ) GROUP BY wpit_connections.id ORDER BY sort_column, last_name, first_name LIMIT 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment