Could someone help me please I have three tables:

gallery
gallery_images
users

I am joining data from the three tables the problem is that there are multiple records that appear in the gallery_images that relate to one gallery record.
I need to display the first record only while joining the three tables.

This is the sql query so far:

SELECT * FROM gallery, gallery_images,...