php - How to Select from four tables in sql? -
this table structure
plinks
- link
- ojectidfk
- uidfk
ojects
- ojectid
- uidfk
- ojectname
try
- useridfk
- ojectidfk
- goryidfk
gory
- goryid
- goryname
what want select ojectname
ojects
plinks projectidfk
same in ojects , plinks
select try ojectid
equal ojectsid
pinks link = 8493284 , gory id = try goryidfk
select obj.objectnamem, try.* objects obj inner join plinks on plinks.projectidfk = obj.ojectid inner join try on try.projectidfk = obj.ojectid inner join gory on gory.goryid = try.goryidfk plinks.link = 8493284
Comments
Post a Comment