今天写thinkphp的orm封装的时候 需要写一个 select * from table where user_id=xxx and find_in_set(100,group_id)这样的SQL 发现怎么写$map['group_id']都有问题。后来查询了一下解决了

用  $map['_string']="FIND_IN_SET(".$group_id.",group_id_list)";查询某个分组的所有人,而每个人有多个分组id,通过逗号组合成的group_id_list作为字段存储的

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2022-01-10
  • 2022-12-23
  • 2021-09-28
  • 2021-08-27
猜你喜欢
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案