Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created August 5, 2014 02:12
Show Gist options
  • Save taleeb35/3066cc143b5f09560a56 to your computer and use it in GitHub Desktop.
Save taleeb35/3066cc143b5f09560a56 to your computer and use it in GitHub Desktop.
public function mail() {
$NewDate=Date('y:m:d', strtotime("+2 days"));
$emails = $this->Issue->find('list',array(
'conditions' => array('Issue.date_target' => $NewDate),
'fields' => array('Issue.owner_id')
));
//foreach($emails as $email):
$user_emails = $this->User->find('list',array(
'conditions' => array('id' => $emails),
'fields' => array('email')
));
//endforeach;
debug($user_emails);
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment