This time my setup looks like this: one table with galleries names
CREATE TABLE GalleriesName (
gallery_id
, gallery_name
)
and another table with galleries photos
CREATE TABLE GalleriesPhotos (
photo_id
, photo_gallery_id
, photo_name
)
What I need is to get all the galleries with one random picture for each gallery.
Is it possible to do this with a single query?