Well, I figured it out. It took two queries.
Probably a better way I'm not thinking about, but this works in case anyone
needs/wants.
Was hoping to do it all in the SQL statement I guess.
$FieldGroups = $wpdb-get_results(SELECT DISTINCT Field_Group FROM
.table_name);
foreach($FieldGroups as
Hello All,
How can I group database results in a foreach loop?
I have a field_group column that can have a value or not.
I want to read from the database then display results and if the results have a
matching field_group, I want to have them group in the html.
This is my current SQL. I am