Hi
I have this sql statement:
SELECT *
FROM `posts`
LEFT JOIN comments ON comments.post_id = posts.id
ORDER BY comments.`timestamp`,posts.`timestamp` DESC
this gives me first the latest posts with comments and then all the posts with no comments
this is not what I need. I need that if the comment timestamp is null than it will be sorted by the posts timestamp
is that possible in one query?
thanks!