A
A
Anton972015-10-12 22:45:00
Yii
Anton97, 2015-10-12 22:45:00

How to sort table No. 1 in yii2 depending on table No. 5, they have no direct links only through tables 2,3,4?

There are 5 tables

  1. Products
  2. Prices
  3. Warehouses
  4. Warehouse addresses
  5. Weird

Through the listview, I display products, I need to sort these products by country. At the same time, Goods with countries are not directly connected in any way. The connection goes like this: Products-> One-to-many-> Prices (one product can have from 1 to 3 types of prices). Products -> One to many -> Warehouses (one product can have 3000 warehouses) -> One to one -> Addresses -> one to one -> countries
The list view displays 5 - 10 products with price spreads (price table) and sorted by countries depending on the quantity of goods in stock on the date of receipt. How to feed such a request to dataprovider. Doing JoinWith()->JoinWith-JoinWith is not an option since the product table does not have a direct

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Zhukov, 2015-10-12
@Adobe

There was also a similar task recently, as it turned out, it was easier to just form a free overgrowth and execute it through DAO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question