Currently using Yii framework. I am trying to select a columns in one table and make it an array of a different model. I think yii has a method of doing this, and was wondering what it was. My tables are shown blow:
tables
ticket
ID | code
picks
ID | ticket_ID | Points
I have a list of picks. And I would like to make it into a list of tickets. Any help would be nice. thank you
public static function get_tickets_pick($Points){ $picks = Picks::model()->findAllByAttributes(array('Points'=>$Points)); $tickets = //yii command to convert it return $tickets; }