Get levels for the Reply system in php+sql : <pre><code>    id  user_id   comment_id  body                       parent level
    94  4         28         first reply                 NULL    NULL
    95  4         28         second reply                NULL    NULL
    96  4         28         reply to the first reply    94      1
    97  4         28         reply to the second reply   95      1
    98  4         28         third reply                 NULL   NULL
    99  4         35         Reply to the third comment  NULL   NULL
    100 4         29         reply to the second comment NULL   NULL
</code></pre>

<p>Name : replies</p>

<p>Hey all, i am now working on a comment and reply system which contains infinity reply recursions and for that i need to get the levels of the reply . Above is my table and the values in the level column are wrong. i couldn't get the query to get the levels. So far my logic is this.
the reply to a comment will be the parent reply which will be NULL in parent column and rest of the reply for that reply will be of the reply ID as the parent and it is working . i need the help to get the levels which are greater than one 
that is, get the value 2 for the reply to the reply to the reply of a comment </p>
