WHERE p.thread_id='$thread_id' ORDER BY post_datestamp DESC LIMIT $rowstart,$posts_per_page"