Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in把能拼接"" #48

Open
CoocaChina opened this issue Apr 13, 2022 · 2 comments
Open

in把能拼接"" #48

CoocaChina opened this issue Apr 13, 2022 · 2 comments

Comments

@CoocaChina
Copy link

"error": "StatementCallback; bad SQL grammar [SELECT * FROM Equipment WHERE ( barCode IN ( 'lb1649400074854' ) OR RFID IN ( ) OR nfc IN ( ) OR recorderCode IN ( ) )]; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR nfc IN ( ) OR recorderCode IN ( ) )' at line 1",

@mingwulipo
Copy link

mingwulipo commented Apr 13, 2022 via email

sim-wangyan added a commit that referenced this issue Apr 13, 2022
@sim-wangyan
Copy link
Member

最终还是没支持拼接 IN (''), 和标准SQL有区别。 用sqli API的时候,主要是为了业务层自动过滤掉null, "", " "等。如果加上了, 就违背了API的初始目标。解决方案是增加了IN 过滤 [""] 里面的""。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants