下面的函数用于获取受尊重用户的邮件ID
function getMomMailId($data){
$this->db->select('email');
$this->db->from('tbl_users');
//I used where_in, and compared the array of user ids with ids in another table
$this->db->where_in('userId',$data['toid']);
$query = $this->db->get();
$result=$query->result_array();
return($result);
}
对于两个记录,它从数据库表中提供了所有电子邮件ID。并且数组中有两个记录。它应该只有两个电子邮件ID。