开发者

FIND_IN_SET in mysql

Hey, I just want to know开发者_开发技巧 if it's ok to do this:

SELECT * FROM `table1` WHERE FIND_IN_SET("value1", `field1`)

as opposed to this:

SELECT * FROM `table1` WHERE FIND_IN_SET("value1", `field1`) > 0


Yes, that's fine. If it finds the value, then the result will be greater than 0, which MySQL will interpret as TRUE.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜