【问题标题】:Codeigniter Querying array data against string columnCodeigniter根据字符串列查询数组数据
【发布时间】:2017-11-05 15:27:52
【问题描述】:

我有这样的 player_pos 列:

所以想查询数据,例如,如果我有类似的数组 player_pos = array('LCV', 'RCV') 我想让每个具有价值 LCV 和 RCV 作为 player_pos 的用户。 如何使用 Codeigniter 做到这一点?

【问题讨论】:

    标签: php mysql arrays codeigniter


    【解决方案1】:
    foreach($player_pos as $pos){
        $this->db->like('player_pos',$pos);
    }
    

    我觉得自己好傻:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-05
      • 1970-01-01
      • 2021-04-27
      相关资源
      最近更新 更多