public function unique_email($email)
{
$this->db->select('*');
$this->db->from('instructor, student');
$this->db->where('instructor.email',$email);
$this->db->or_where('student.email',$email);
$sql = $this->db->get();
$result = $sql->num_rows();
return $result;
}
In the above query I am simply trying to get unique email id in multiple tables but the above query doesn't work. I don't know why?