SELECT model
FROM service
WHERE (
model LIKE '"industry":"F47cA7c5M4"'
OR model LIKE '"industry":{"id":"F47cA7c5M4"}'
)
我收到以下错误:
code: 5
message: "could not prepare statement (1 near "(": syntax error)"
只是想要注意,这个SQL语句是生成的,并且包含在括号中,用于需要包含附加OR语句并与AND连接的情况。
更新
不确定如何修复它,但这个新的SQL语句没有给出任何错误:
SELECT model
FROM service WHERE (
model LIKE '%"industry":"F47cA7c5M4"%'
OR model LIKE '%"industry":{"id":"F47cA7c5M4"}%'
)