这是我的选择查询,
select rac_username, rac_profilepicture, tafd_postid, tafd_postcontent, tafd_postimage_source, DATE_FORMAT(tafd_postadded,'%M %d, %Y') tafd_postadded,tafd_imotion, (select count(rpg_actormakeget) from r_post_getyou where rpg_postrelate = tafd_postid and rpg_isremoved = 0) as tafd_igetyoucount, (select count(rpg_postrelate) from r_post_getyou where rpg_postrelate = tafd_postid and rpg_actormakeget = (select rac_accountid from r_account_credentials where rac_username = 'zheuswalker' )) as isliked, (select count(rfc_commentid) from r_feeds_comments where rfc_feedparent = tafd_postid) rfc_commentcount from t_account_feeds inner join r_account_credentials on r_account_credentials.rac_accountid = t_account_feeds.tafd_postcreator
ORDER BY STR_TO_DATE (tafd_postadded,'%M %d, %Y') ASC
我已经尝试按 desc 排序日期,但我仍然没有得到预期的结果。我希望日期将按升序排序(最新到最旧)。
我也尝试通过这个(ORDER BY tafd_postadded asc)订购它并查看图片,请注意 2019 年 3 月介于 2018 年 6 月和 2018 年 11 月之间