En Fr
Web/database development and more...
« b2 evolution: New features summaryPHP oddities :( »

mySQL DISTINCT FUNCTION(...) bug

10.05.03

English (EU) mySQL DISTINCT FUNCTION(...) bug

Permalink 22:10:27, by Francois Planque Email , Categories: mySQL

Looks like mySQL is not able to to perform the DISTINCT selection in cases like this:

SELECT DISTINCT YEAR(post_date), MONTH(post_date) 
  FROM whatever1 INNER JOIN whatever2 ON field1 = field2
 ORDER BY post_date

This can be worked around, but it seems ridiculous!...

SELECT DISTINCT YEAR(post_date), MONTH(post_date) 
  FROM whatever1 INNER JOIN whatever2 ON field1 = field2
 ORDER BY YEAR(post_date), MONTH(post_date)

No feedback yet

Comments are closed for this post.