helo
i've got 2 tables
Gallery
Gallery_Id,Gallery_Name
Images
Images_Id,Gallery_Id,Images_Filename,Images_Width,Images_Height
I'd like to select all galeries from Gallery and join Images to each gallery but i'd like to limit 3 images per gallery
this code list all images from all galleries, i suppose that i must try with subqueries, am i wrong ?
Via-Net - web directory
i've got 2 tables
Gallery
Gallery_Id,Gallery_Name
Images
Images_Id,Gallery_Id,Images_Filename,Images_Width,Images_Height
I'd like to select all galeries from Gallery and join Images to each gallery but i'd like to limit 3 images per gallery
this code list all images from all galleries, i suppose that i must try with subqueries, am i wrong ?
Code:
SELECT a.Gallery_Id,a.Gallery_Name,b.Images_Id,b.Images_Filename
FROM Gallery AS a INNER JOIN Images AS b ON b.Gallery_Id=a.Gallery_Id
Via-Net - web directory