I know this is more a MySQL question but this board has oodles of brains here so here we go......
SELECT DISTINCT * FROM table GROUP BY paid DESC, rand()
The sql statement above is what I am using to display a full listing of all people in the database. That I want to do is list ALL people FIRST that have paid. The paid column has dates that the persons account expires. example: 2006-07-01
What I am attempting to do is NOT list by the 'paid' expire date but instead, the client_id (first column which is autoincrement) but still have the listing show the people that have 'paid' first, then all others that have not paid in random order.
Does anyone know the proper format (if one exists) that would show the 'paid' people in order of client_id instead of in order of the 'paid' date?!?!?
Thanks all for your help and/or input!