G
G
Grigore Vodnicear2017-09-12 18:15:56
MySQL
Grigore Vodnicear, 2017-09-12 18:15:56

How to work with data of one entity, but which are in different tables?

Good evening,
There is an essence of categories.
There is a table category :
65d853dc57eb4a55baec4bdb28f728e9.png
And another table category_translate :
4c1edff29d384665bc64d235ca852acd.png
Generated a CRUD for category and a model for category_translate .
How to connect table data?
For example, to pass the id of the language, and in response came a list of categories with data from category_translate ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Fedorov, 2017-09-12
@grigvod

Video straight for you
Related Models in Yii2

A
Axian Ltd., 2017-09-12
@AxianLTD

Use an ORM

Z
zoozag, 2017-09-12
@zoozag

Read about JOINs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question