SELECT `comp_journal_detail`.*, `comp_chart_of_acct`.`acctCode` as acctcode, `comp_chart_of_acct`.`acctName` as acctname
FROM (`comp_journal_detail`)
LEFT JOIN `comp_chart_of_acct` ON `comp_chart_of_acct`.`ID` = `comp_journal_detail`.`acctCode`
WHERE `comp_journal_detail`.`companyID` =  '3'
AND `journalID` =  'JL20150300000001'
ORDER BY `sequence`