pre_order_details
Код: Выделить всё
id pre_order_id product_id product_quantity
Recieve_Pre_Order
Код: Выделить всё
id pre_order_id product_id quantity_recieved
Я хочу передать pre_order_id и получить все связанные данные.
Вот мой запрос
Код: Выделить всё
$this->db->select('*');
$this->db->from('pre_order_details');
$this->db->join('recieve_pre_order', 'recieve_pre_order.product_id = pre_order_details.product_id');
$this->db->where('pre_order_details.pre_order_id',$pre_order_id);
return $this->db->get();
Подробнее здесь: https://stackoverflow.com/questions/422 ... duplicates
Мобильная версия