2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-31 05:55:11 +00:00

set searches, eg. id:1,2,3,4,5

--HG--
branch : moe
extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%40458
This commit is contained in:
petopeto
2010-11-18 20:47:53 +00:00
parent a3dcdb2e85
commit 0ca3b65bcf
2 changed files with 12 additions and 0 deletions

View File

@@ -32,6 +32,11 @@ module PostSqlMethods
p << arr[1]
p << arr[2]
when :in
items = ["?"] * arr[1].length
c << "#{field} IN (#{items.join(", ")})"
p.concat(arr[1])
else
# do nothing
end