SELECT organizations.name as name,
tech.desk_phone as tech_phone,
FROM organizations
LEFT JOIN coradiant_contacts tech
ON organizations.tech_mgr = tech.contact_id
WHERE organizations.org_id = 56;
If the contact_id does not exists in the coradiant_contacts table I get this message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM organizations
LEFT JOIN coradiant_contacts tech
ON organizations.tech_mg' at line 3
Instead, I'd like tech_phone to be populated with NULL