I wish to select them in a way that after a Male (M) comes a Girl (W) and then again a Male (M) etc and then, when there are no other W the remaining data in any order ... something like: John (M), Kim(W), Andrew(M), Mary(W), Peter (M), Tim(M). I know i could load them via php into a table and do this, but the db table is huge and this would take up proccess time.