I am trying to select the following query from my table:
SELECT ARTICLE_NO, USERNAME, ACCESSSTARTS, ARTICLE_NAME,
date_format(str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), '%d %m %Y' ) AS shortDate
FROM AUCTIONS WHERE SUBCAT = 'fake' and USERNAME = 'testuser' ORDER BY
str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), article_no limit 0, 10
I get 0 results back.
However, both
SELECT ARTICLE_NO, USERNAME, ACCESSSTARTS, ARTICLE_NAME,
date_format(str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), '%d %m %Y' ) AS shortDate
FROM AUCTIONS WHERE SUBCAT = 'fake' ORDER BY
str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), article_no limit 0, 10
and
SELECT ARTICLE_NO, USERNAME, ACCESSSTARTS, ARTICLE_NAME,
date_format(str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), '%d %m %Y' ) AS shortDate
FROM AUCTIONS WHERE USERNAME = 'testuser' ORDER BY
str_to_date(ACCESSSTARTS, '%d.%m.%Y %k:%i:%s'), article_no limit 0, 10
return the expected result sets. Why are they not working together?