Fix newsfeed sql query with many parameters
This commit is contained in:
parent
b54916b1dc
commit
7bef78e10f
2 changed files with 9 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
|||
import time
|
||||
import re
|
||||
import gevent
|
||||
from util import helper
|
||||
|
||||
|
||||
# Special sqlite cursor
|
||||
|
||||
|
@ -36,7 +38,7 @@ class DbCursor:
|
|||
operator = "IN"
|
||||
if len(value) > 100:
|
||||
# Embed values in query to avoid "too many SQL variables" error
|
||||
query_values = ",".join(map(self.quoteValue, value))
|
||||
query_values = ",".join(map(helper.sqlquote, value))
|
||||
else:
|
||||
query_values = ",".join(["?"] * len(value))
|
||||
values += value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue