SELECT `a`.*, `b`.`code` as dtFormat, `b`.`codeJava` as dtFormatJava, `c`.`fldcurr_code` as currencyWord
FROM (`company` a)
LEFT OUTER JOIN `_ref_dateformat` b ON `b`.`ID` = `a`.`dateFormat`
LEFT OUTER JOIN `_ref_currency` c ON `c`.`fldid` = `a`.`currencyID`
WHERE `a`.`ID` =  '3'