I\'m attempting to join multiple tables in a select query. What I have is an artwork table that needs to be linked to an artists table through a table called artwork_artists. Not only does it need to link artists, however, but it also needs to link designers, contributors, and the different themes that it falls under. This is my SQL that doesn\'t seem to work.
$czSql = \"
select
artwork.image_path as image_path
,artwork.location as location
,artwork.description as description
,artwork.title as title
,artwork.project as project
,artwork.created_date as created_date
,artwork.last_updated as last_updated
,artwork.last_indexed as last_indexed
,artwork.source_file as source_file
,artists.artist_name
,contributors.contributor_name
,designers.designer_name
,themes.theme_name
from
artwork left join artwork_artists on artwork.artwork_ID = artwork_artists.artwork_ID
,artists
,artwork left join artwork_contributors on artwork.artwork_ID = artwork_contributors.artwork_ID
,contributors
,artwork left join artwork_designers on artwork.artwork_ID = artwork_designers.artwork_ID
,designers
,artwork left join artwork_themes on artwork.artwork_ID = artwork_themes.artwork_ID
,themes
where
artwork_artists.artist_ID = artists.artist_ID
and artwork_contributors.contributor_ID = contributors.contributor_ID
and artwork_designers.designer_ID = designers.designer_ID
and artwork_themes.theme_ID = themes.theme_ID
and artwork.artwork_ID = 141
;\";
The biggest problem is that I don\'t know the syntax for using multiple joins. Any help would be greatly appreciated.
Ryan