From 3f22dc639d43d3beda597bb8c41f034da9a1cfab Mon Sep 17 00:00:00 2001 From: uckelman Date: Tue, 13 Apr 2010 21:28:20 +0000 Subject: Added getFirstPostId(). git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6705 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/PhpBB3.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/PhpBB3.php b/src/PhpBB3.php index 48361a6..ca75c24 100644 --- a/src/PhpBB3.php +++ b/src/PhpBB3.php @@ -120,6 +120,18 @@ class PhpBB3 { return $row ? $row['post_time'] : false; } + public function getFirstPostId($topicId) { + throw_if_null($topicId); + + global $db; + + $sql = 'SELECT topic_first_post_id FROM ' . TOPICS_TABLE . ' ' . + 'WHERE topic_id = ' . $topicId; + + $row = $this->get_exactly_one_row($sql); + return $row ? $row['topic_first_post_id'] : false; + } + public function postMessage($postType, $forumId, $topicId, $msg) { throw_if_null($msg); -- cgit v1.2.3