SQL Array Search

前端 未结 4 1562
悲&欢浪女
悲&欢浪女 2021-01-26 05:45

I have a group feature on my website that allows 1 user to put the userids of any of his or her friends into an invitedusers column. I need to do an SQL search to determine whet

4条回答
  •  悲哀的现实
    2021-01-26 06:25

    I'm not sure if this is the best way but:

    where concat(',',invitedusers,',') like '%,234,%'
    

    So in your example ,234, is inside ,234,394,479,

提交回复
热议问题