aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2012-07-12 16:30:45 +0530
committerDhruv <dhruv.goel92@gmail.com>2012-07-19 23:01:48 +0530
commitb81941a997760eca4f209cc100fe2baec3ef4468 (patch)
treecd8deaa51ff4d75dbc812d0d7fd10b33fb3eff0b /phpBB/includes
parent118b57f71d9f563f8eeda8e5925d482c38ab1af8 (diff)
downloadforums-b81941a997760eca4f209cc100fe2baec3ef4468.tar
forums-b81941a997760eca4f209cc100fe2baec3ef4468.tar.gz
forums-b81941a997760eca4f209cc100fe2baec3ef4468.tar.bz2
forums-b81941a997760eca4f209cc100fe2baec3ef4468.tar.xz
forums-b81941a997760eca4f209cc100fe2baec3ef4468.zip
[feature/sphinx-fulltext-search] use CASE instead of IF
IF is not supported in pgsql, use CASE instead supported in both mysql and pgsql. PHPBB3-10946
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index c223284c72..f505703c09 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -159,7 +159,7 @@ class phpbb_search_fulltext_sphinx
p.forum_id,
p.topic_id,
p.poster_id,
- IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post,
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
p.post_time,
p.post_subject,
p.post_subject as title,
@@ -191,7 +191,7 @@ class phpbb_search_fulltext_sphinx
p.forum_id,
p.topic_id,
p.poster_id,
- IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post,
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
p.post_time,
p.post_subject,
p.post_subject as title,