Skip to content

Commit

Permalink
fix order by @
Browse files Browse the repository at this point in the history
  • Loading branch information
hooopo committed Oct 29, 2019
1 parent 0c9a952 commit 0702d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/topic_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def get_sort_order(post_number)
SELECT posts.sort_order
FROM posts
WHERE posts.topic_id = #{@topic.id.to_i}
ORDER BY @(post_number - #{post_number.to_i})
ORDER BY ABS(post_number - #{post_number.to_i})
LIMIT 1
SQL

Expand Down

0 comments on commit 0702d24

Please sign in to comment.