user900341
user900341

Reputation: 1

PHP MySQL Joining of few joined tables

There are 2 queries:

select * from gallery_images JOIN photo_galleries ON photo_galleries.albumID=gallery_images.albumID


select * from multimedia_video JOIN video_content ON multimedia_video.id=video_content.id_href

Also i have "albumDateCreated" field on "photo_galleries" table and "DateCreated" field on "multimedia_video". I want to sort my queries by these fields

What is the best technique to JOIN my 2 "joins"?

Upvotes: 0

Views: 71

Answers (1)

glglgl
glglgl

Reputation: 91039

Just the way you created the others:

SELECT * FROM gallery_images
    JOIN photo_galleries ON photo_galleries.albumID=gallery_images.albumID
    JOIN multimedia_video ON photo_galleries.albumDateCreated=multimedia_video.DateCreated
    JOIN video_content ON multimedia_video.id=video_content.id_href

Upvotes: 1

Related Questions