cretaceous;10999612 wrote:the id it shows could be either 5 or 2 depending on the weather.
Not at all - that's what the ORDER BY clause is for.
cretaceous;10999612 wrote:The ordering has no effect on which ID of the two (or more) matches it shows.
Of course it has an effect. Why else would MySQL even have an 'ORDER BY' clause if it didn't have any effect on the order of the results?
cretaceous;10999612 wrote:You're after an 'order by' as a sub clause of the 'Group by' - sorry, I don't know how to write that
Me neither, because such a thing doesn't exist. You just need a normal 'ORDER BY' clause.
Derokorian;10999616 wrote:This is because MySQL searches from the beginning of the table
... except that tables don't really have a "beginning." If you don't have an ORDER BY clause, the order of the rows returned is undefined/ambiguous.
@: Rather than selecting the EventsID column directly, try SELECT'ing something like:
GROUP_CONCAT(EventsID) ListOfIDs
and let us know what you get.
Also, you still haven't shown us the schema and sample data I asked for above. I'm unable to reproduce your results, but that was with my own schema and my own data (both created based on your simplified description in your first post).
EDIT: Looks like Weedpacket replied while I was composing my own reply above. At least we agree on the ambiguous order of rows returned without an 'ORDER BY' clause. :p