how to make a join statement between multi table to one table?

Alanarion

New Member
First, i have 4 table and columns such as [*]feeds (id, type, type_id)[*]feeds_normals (id, type, content)[*]feeds_links (id, type, title, link)[*]feeds_youtubes (id, type, title, link, description, image)[*]feeds_photos (id, type, link)The table of "feeds type_id" is match/linkup "id" of normals, links, youtubes, photos AndThe table of "feeds type" is using the identified which table should be joinedFor example:\[code\]feeds:id: 1, type: "normal", type_id: 1id: 2, type: "link", type_id: 1feeds_normals:id: 1, type: "normal", content: "this is a test"feeds_links:id: 1, type: "link", title: "This is a title", link: "http://yahoo.com"\[/code\]Result:\[code\]id: 1, type: "normal", content: "this is a test", title: NULL, link: NULLid: 2, type: "link", content: NULL, title: "This is a title", link: "http://yahoo.com"\[/code\]FinallyIn this case, how to write by SQL statement?
 
Back
Top