Hey this is more of a MySQL than PHP question, but can anyone help?
I have signups on my site for different build dates for Habitat for Humanity. I have it ordered by if they checked off having a car to drive people and by when they signed up at first. So when you go view the page you see:
select * from EVENTS where eventid='$eventid' ORDER BY hascar DESC , id
I want to order it by the same criteria PLUS how many builds they've been on so if you've been on less you are on the list higher than those who have been on a bunch.
select , count() as counted from EVENTS eventid='$eventid' group by name ORDER BY counted, hascar DESC , id
This will make everyone counted as 1, and without the where statement it will select every signup ever. Any ideas on how to fix this?