I am trying to LEFT JOIN a table, but the two columns used for relating rows are not identically formatted.
My problem is the value in a.vendor
, it has leading zeros on it, and c.No
doesn't have leading zeros. I tried to make it int to remove the zero, but my code int('a.vendor')
is not working.
$query
->select(array('a.*'))
->select($db->quoteName('c.Name', 'vendor_name'))
->select($db->quoteName('d.name', 'vendor_subcontractor'))
->from($db->quoteName('cert_pack_fcm', 'a'))
->join('LEFT', $db->quoteName('our_vendors', 'c') . ' ON ' . $db->quoteName('a.vendor' ) . ' = ' . $db->quoteName('c.No'))
What should I do?