/**
  * Calculates the position of a specific post in this thread.
  */
 protected function goToPost()
 {
     $sql = "SELECT\tCOUNT(*) AS posts\n\t\t\tFROM \twbb" . WBB_N . "_post\n\t\t\tWHERE \tthreadID = " . $this->threadID . "\n\t\t\t\t" . $this->postList->sqlConditionVisible . "\n\t\t\t\tAND time " . ($this->sortOrder == 'ASC' ? '<=' : '>=') . " " . $this->thread->getPost()->time;
     $result = WCF::getDB()->getFirstRow($sql);
     $this->pageNo = intval(ceil($result['posts'] / $this->itemsPerPage));
 }