**CI中使用IN查询(where_in)
生活随笔
收集整理的這篇文章主要介紹了
**CI中使用IN查询(where_in)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
注意別漏了$this->db->get();
/*** 匹配用戶手機號,返回匹配的用戶列表
* @param $column_str 'user_id, user_name, user_avatar_src, user_mobile, user_title, user_department, user_hospital, user_audit_status '
* @param $mobile_array
*/
public function match_user_mobile($column_str, $mobile_array)
{
$this->db->select($column_str);
$this->db->from('xm_user');
$this->db->where_in('user_mobile', $mobile_array);
$query = $this->db->get();
//var_dump($query); 測試
//row_array取一行數據;result_array取多行數據
return $query->result();
}
轉載于:https://www.cnblogs.com/kenshinobiy/p/4360767.html
總結
以上是生活随笔為你收集整理的**CI中使用IN查询(where_in)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 密码强度评分规则
- 下一篇: 巧用svn create patch(打