I currently have a MySQL query similar to the following:
SELECT * FROM People ORDER BY lname, familyrole, gender, birthday
However, the data is not what I need.
I would like the following:
if $familyrole = "Head of Household" - I want the order to be by gender
if $familyrole = "Non-Head of Household" - I want the order to be by birthday.
Any suggestions? Thanks for you help in advance.