sql - Select result from multi tables with joins -


i have query. want select

surgery type
surgery details
modality id

am on right path atleast?

the link table middle of everything

addmission 1tom on link
surgery mto1 on link
modality mto1 on link

my problem add in modality.id result.
skip modality, , query works 100%

updated (dropped multi alias)

select surg.srg_details, surg.type, modd.id surgery surg join link lnk on lnk.lnk_id = surg.srg_lnkid join modality modd on modd.mod_lnkid = lnk.lnk_id join admission adm on adm.adm_id = lnk.lnk_admid  adm.adm_id = 192100042 

try use in case:

select surg.srg_details, surg.type, mod.id surgery surg, modality mod join link lnk on lnk.lnk_id = surg.srg_lnkid join admission adm on adm.adm_id = lnk.lnk_admid  adm.adm_id = 192100042 , surg.srg_lnkid = mod.mod_lnkid 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -