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

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -