SELECT DISTINCT email FROM table 1, table2 WHERE email = array value AND table1.id = table2.id
if ($query->row()->email == $emailv)
SELECT DISTINCT email FROM table 1, table2 WHERE email = array value AND table1.id = table2.id
if ($query->row()->email == $emailv)