One to many left join

Hi Wapplers

struggling with a server connect. I have a one to many table, the right table can also be null (no records).

So i have a table “jobs” and a table of “job_photos”. Jobs is a table with 1 row. job_photos can contain NO photos or many photos.

On my App side I have a repeat region that loops through jobs showing the jobs, and what I want it to do is then show 1 image from job_photos if it has a photo.

I have it showing a photo and if no photo it shows “no image uploaded”. But, if jobs_photo has say 3 photos uploaded then I get 3 rows in my page.

I need a top 1 job_photos type thing to just give me one image.

Not sure if its possible in wappler. If not I will have to add a column to the job_photo of “show this image” but then dont know how to populate that field if someone drags and drops multiple images when they do their upload.

Thanks
Darren

Community Page
Last updated: