Hello Friends,
If your are looking to use join with query builder in Symfony2. Please review the code as below and make the changes accordingly:
$qb = $this->getConn()->createQueryBuilder();
$qb->select('ts.model_id,
ts.full_name,
ts.citizenship,
ts.status,
ts.updated_at,
ts.is_itin_verified,
pm.pm_vendor_id,
pm.pm_type,
m.m_profilename as displayname,
m.m_username as logname,
m.m_profileImage as profilepic')
->from('tbl_model_tax_setting_info', 'ts')
->leftJoin('ts', 'tbl_model', 'm', 'm_id = model_id')
->leftJoin('m', 'tbl_paymentmethod', 'pm', 'pm_m_id = m_id');
// ts is a alias of tbl_model_tax_setting_info
// you can use join, right join as per your requirement
$results = $qb->execute()->fetchAll();
0 Comment(s)