I've below MySql query, I would like to change use it in Magento format.
How can i do that ?
SELECT customer_entity_varchar.value, customer_entity_text.value from customer_entity INNER JOIN customer_entity_varchar ON customer_entity.entity_id=customer_entity_varchar.entity_id INNER JOIN customer_entity_text ON customer_entity.entity_id = customer_entity_text.entity_id
I've tried below but it only returns me. One table values not other ones.
$connection = $this->_resource->getConnection(); $select = $connection->select() ->from( ['customer_entity'] ) ->join('customer_entity_varchar', 'customer_entity.entity_id = customer_entity_varchar.entity_id') ->join('customer_entity_text', 'customer_entity.entity_id = customer_entity_text.entity_id'); $selectnew = $connection->fetchAssoc($select); echo "<pre>"; print_r($selectnew); exit;
Any help would be really appreciated.