So I have a query that I am using for labels in a bar graph. I am extracting those labels using fetch_array in PHP. The label order should be:
White, African American, Hispanic etc etc.
but once we do any type order by asc or desc they come in alphabetical order such as
African American, Hispanic, White. Is there a way to order these specifically in a certain order?
Use a
CASEstatement to specify your sort order. It will assign 0 to the valueWhiteand 1 to all other values, then sort the remaining values alphabetically.