php - Codeigniter 根据字符串列查询数组数据

标签 php mysql arrays codeigniter

我有这样的player_pos列:

player_column column

所以想查询数据,例如,如果我有像这样的数组 player_pos = array('LCV', 'RCV') 我想让每个具有 LCV 和 RCV 值(value)的用户作为player_pos。 我怎样才能用 Codeigniter 做到这一点?

最佳答案

foreach($player_pos as $pos){
    $this->db->like('player_pos',$pos);
}

我觉得自己好蠢:)

关于php - Codeigniter 根据字符串列查询数组数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47123272/

相关文章:

php - MYSQL统计

php - "Notice: Undefined variable"、 "Notice: Undefined index"、 "Warning: Undefined array key"和 "Notice: Undefined offset"使用 PHP

php - mysql从3行中选择关键字

javascript - JavaScript 中的数组和对象处理用于获取 highchart json 数据

javascript - 如果一个对象为空,则获取另一个值形式对象 Angular 6

php - 警告 : mysql_fetch_array(): supplied argument is not a valid MySQL result resource

PHP PDO 在连接到 MySQL 服务器失败时隐藏错误消息

mysql - 如何将 CSV 文件导入 MySQL 表?

VARCHAR 字段上的 MySQL Errno 150

python - 如何修剪掉数组元素的\x部分?