Here is my query.
i specified it for order by x.xref_id, but it is not ordering according to that. what will the problem ...?
select DISTINCT n.id,n.title from article_en as n left join article_en_xref as x on n.id=x.article_en_id where(n.id=x.article_en_id and n.date= curdate() and n.topic <> 12) or (n.date= curdate() and x.article_en_id is null and n.topic <> 12) order by x.xref_id desc,n.creation_time desc