My Query:
select distinct ml.send_to from message_log as ml where NOT exists
(select mobile_no from user_details WHERE user_details.mobile_no = ml.send_to);
$select1 = $db->select()->from('user_details',array('mobile_no'))
->where('user_details.mobile_no = ml.send_to');
$select2 = $db->select()->distinct()
->from(array('ml'=>'message_log'), array('ml.send_to')))
->where('NOT EXISTS ?', $select1);
This will do the trick in the easiest way.