Little more explanation:
I have tables 'person' and 'group'. The 'person' -table contains usual personal data (name, address etc.) and the group should be a linker table with only 3 columns: groupID, groupOrderNum and group_persID.
The idea is to collect groups of persons: in each group there can be a number of different persons (identified by groupID and persID) and the table should "remember" the order in which the user added the persons to the group. This cannot be alphabetical order and that's why I have the groupOrderNum -field which tells the person's position in the group.
The problem appears when I am doing a html UI for this database. I have two forms on the same page: one for person list (where user can pick up any person) and another for the group which shows the persons user has added to the group. Altough PHP maintains the correct order of persIDs in a temporary array, when I update the group list - after the user has added a new person in it - with the above query, the listing gets in different order than in which the user actually added the persons.