Ejemplo n.º 1
0
 public function getInfomationByOdds($arrayOfOddIds)
 {
     $oddsIds = implode(',', $arrayOfOddIds);
     $odds = new Model_OddValueModel();
     $betType = new Model_BetsTypeModel();
     $eventBetsModel = new Model_EventBetsModel();
     $this->resetQuery();
     $this->addQuery('select', array('table' => $this->getTableName()));
     $this->addQuery('leftJoin', array('table' => $eventBetsModel->getTableName(), 'condition' => 'bets_id = bets_id_FK'));
     $this->addQuery('leftJoin', array('table' => $betType->getTableName(), 'condition' => 'event_bets_id_FK = event_bets_id'));
     $this->addQuery('leftJoin', array('table' => $odds->getTableName(), 'condition' => 'bet_types_id_FK=bet_types_id'));
     $this->addQuery('where', array('where_condition' => "odd_value_id in ({$oddsIds})"));
     return $this;
 }