Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public function bodyType($type)
  2. {
  3. $tableSpec = ModelSpecies::tableName() . ' spec';
  4. $tableCarcase = ModelCarcase::tableName() . ' carcase';
  5.  
  6.  
  7. return $this->innerJoin($tableSpec, 'car.model_spec_id = spec.model_spec_id')
  8. ->innerJoin($tableCarcase, 'spec.model_carcase_id = carcase.model_carcase_id')
  9. ->andFilterWhere(['carcase.body_type_id' => $type]);
  10.  
  11. }
  12.  
  13. public function transmission($transmission)
  14. {
  15. $tableSpec = ModelSpecies::tableName() . ' spec';
  16.  
  17.  
  18. return $this->innerJoin($tableSpec, 'car.model_spec_id = spec.model_spec_id')
  19. ->andFilterWhere(['spec.transmission_type' => $transmission]);
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement