About escape in sql statements. #2556
Unanswered
xiaokang69
asked this question in
Q&A
Replies: 2 comments 1 reply
-
what's the problem? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
query := fmt.Sprintf("select %s from %s where
user_id
= ? ANDcode
= ? ANDexpire_time
> ? ORDER BY id DESC limit 1", verificationCodeRows, m.table)执行sql的 会把 >号转移成 \u003e 执行sql的时候会报错
select id,user_id,code,create_time,expire_time from verification_code where user_id = 1 AND code = '582803' AND expire_time \u003e '2022-10-27 08:00:33' ORDER BY id DESC limit 1
应该怎么处理?
Beta Was this translation helpful? Give feedback.
All reactions