Skip to content

Instantly share code, notes, and snippets.

@mikejoseph
Created September 15, 2015 01:00
Show Gist options
  • Select an option

  • Save mikejoseph/e0ce84e613f0a9aaa3ef to your computer and use it in GitHub Desktop.

Select an option

Save mikejoseph/e0ce84e613f0a9aaa3ef to your computer and use it in GitHub Desktop.
<?php
public function getSubjects()
{
$criteria = new \CDbCriteria();
$criteria->condition = 'ims_groups_subjects.group_uid = :gid';
$criteria->params = array(':gid' => $this->getAttribute('group_uid'));
$criteria->join = 'left join ims_groups_subjects on ims_groups_subjects.subject_uid = t.subject_uid ' ;
$criteria->order = "ims_subjects.subject";
return CollabCentre_SubjectRecord::model()->findAll($criteria);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment