Quote:
Originally Posted by Old Pedant
Can you show the result of doing *JUST* the UNION part of that?
|
Here is the output that I get:
Code:
2 | 1348041600
3 | 1348041600
4 | 1348041600
2 | 1348041601
3 | 1348041602
Quote:
Originally Posted by Old Pedant
And you only show 3 records in the "returns like this". I assume it is actually returning many more?
|
Right now there is very limited data in the system for basic testing.
Quote:
Originally Posted by Old Pedant
And you apparently misunderstand how SELECT DISTINCT works.
It applies to *ALL* the fields in your SELECT. If *ANY* fields in the two records are different, then the records are different and the DISTINCT will show them.
Putting parentheses around the field name, as you did with
Code:
SELECT DISTINCT(p.postId), p.roomId, ...
is meaningless. It changes nothing. Remove them and you will get identical results.
|
The only reason I put parentheses around the field name was because I saw it in a tutorial and was trying it out. But like you said, it returns the same as without the parentheses.