You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTCOUNT(1) FROM`user_1718767159000601600`WHERE id = ?id+100AND create_time = ?now()
报错
Error: Error 1064 (42000): 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 '?id+100 AND create_time = ?now()' at line 1
What did you expect to see?
期望是能使用函数,如下面的方式就正常。
SELECTCOUNT(1) FROM`user_1718766980463715400`WHERE (create_time = now()) AND (`create_time`< now())
The text was updated successfully, but these errors were encountered:
hailaz
added
the
bug
It is confirmed a bug, but don't worry, we'll handle it.
label
Jun 19, 2024
Issues-translate-bot
changed the title
database/gdb: 查询时在where中使用gdb.Raw条件不符合预期
database/gdb: Using gdb.Raw conditions in where when querying does not meet expectations
Jun 19, 2024
Go version
go version go1.20.12 windows/amd64
GoFrame version
2.7.0
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
What did you see happen?
报错
Error: Error 1064 (42000): 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 '?id+100 AND create_time = ?now()' at line 1
What did you expect to see?
期望是能使用函数,如下面的方式就正常。
Where("create_time = ?", gdb.Raw("now()"))
这样就正常,Where("create_time", gdb.Raw("now()"))
这样也不行The text was updated successfully, but these errors were encountered: