How is your database set up? That will only work if
1. postid is unique to each post and parentid holds the id of the parent post and NULL if it is itself a parent post.
OR
2. parentid is set to the id of the topic for the parent post only (NULL otherwise) and postid holds the id that parentid holds but is set for child posts instead.
And of course, you pass the parent id to the script. Its hard to tell what's going wrong without knowing without knowing a bit more as the query seems ok.
(The query should only be "WHERE postid = '3' " if postid is a string, otherwise you should remove the single quotes)
Reputation Points: 20
Solved Threads: 13
Junior Poster in Training
Offline 93 posts
since Oct 2005