diff options
| author | Dhruv <dhruv.goel92@gmail.com> | 2012-07-12 16:30:45 +0530 |
|---|---|---|
| committer | Dhruv <dhruv.goel92@gmail.com> | 2012-07-19 23:01:48 +0530 |
| commit | b81941a997760eca4f209cc100fe2baec3ef4468 (patch) | |
| tree | cd8deaa51ff4d75dbc812d0d7fd10b33fb3eff0b /phpBB/includes | |
| parent | 118b57f71d9f563f8eeda8e5925d482c38ab1af8 (diff) | |
| download | forums-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.php | 4 |
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, |
