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.
精彩评论