how can order by last replies? : I am new in php 
I have two tables the first is the 'users' the second is the 'posts',
the 'users' have two columns:
1 id 
2 username
the 'posts' have five columns:
1 p_id
2 uid
3 post_id
4 content
5 date
the posts as defined have the value '0' in post_id and the replies have the value p_id in post_id
my query is `SELECT id,username,p_id,uid,post_id,content,date FROM 
users inner join posts ON users.id=posts.uid WHERE post_id='0' ORDER BY p_id DESC`
but I want to order by the last replies like in the forums .
I am wating for your help thank you