Y
Y
yv19952016-12-21 14:05:05
Magento
yv1995, 2016-12-21 14:05:05

How to pull data from Magento table?

There are 3 tables 1-table of categories, 2-table of stocks (custom), 3-table linking the 1st and 2nd tables one-to-many. Two questions:
1) Is there a category id and how to pull out all the shares by this id, i.e. from the 2nd table?
2) Is there a category id and how can I extract all the data from the 3rd table using this id?
How to do all this in magento ways? ORM? Thank you)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2016-12-21
@khrisanfov

You need to add a join to the category collection before calling load.
Documentation https://framework.zend.com/manual/1.10/en/zend.db....

$categories->getSelect()->join(....);
$categories->load();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question