Table1 - col_name col_city col_tid
Table 2 - col_id col_city
In Magento2 i want col_name,col_city from Table1 And col_id from Table2 Using Join Query And col_city is in both table so i just want col_city from Table1.
i already tried with below join query
$this->setMainTable('Table1');
$this->getSelect()
->joinLeft(
array('tbl2' => $this->getTable('Table2')),
'main_table.col_tid = tbl2.col_id'
)
but it returns both tables col_city column , so i just want col_city only from Table1
so please tell me how i can do this in Magento2