summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-27 22:53:01 +0000
committeruckelman <uckelman@nomic.net>2010-04-27 22:53:01 +0000
commite607c313ecd3ab183255cacf2c016ba7a912dc10 (patch)
tree0fd7630a2076b61259b6dafd81958c904cab87a5 /src
parent51d5652343f9d731caefd32e8de790c18bb2e95b (diff)
Correct SQL.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6776 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src')
-rw-r--r--src/Bridge.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Bridge.php b/src/Bridge.php
index 9753470..2afbd34 100644
--- a/src/Bridge.php
+++ b/src/Bridge.php
@@ -28,10 +28,10 @@ class Bridge {
$sql = 'SELECT p1.message_id FROM posts AS p1 ' .
'LEFT OUTER JOIN posts AS p2 ON (' .
- 'p1.post_id = ' . $postId . ' AND ' .
- 'p2.post_id = ' . $postId . ' AND ' .
+ 'p1.post_id = p2.post_id AND ' .
'p1.edit_id < p2.edit_id' .
- ') WHERE p2.post_id IS NULL';
+ ') WHERE p1.post_id = ' . $postId . ' AND ' .
+ 'p2.post_id IS NULL';
$row = $this->get_exactly_one_row($sql);
return $row ? $row['message_id'] : false;