T
T
tigra2016-10-06 22:40:19
CodeIgniter
tigra, 2016-10-06 22:40:19

How to refer to linked CodeIgniter table?

There is such a connection

$this->db->select("*");
$this->db->from('shop_products');
$this->db->join('shop_products_lang', 'shop_products_lang.shop_products_id = shop_products.id', 'left');
return $this->db->get()->result();

How can I extract the name of a product? In Yii, for example, I would turn
$item->shop_products_lang->name
In the ignitor, I don’t understand how this constructor works.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question