Link between images and widgets

Sometime ago I got an answer (on old forum) connecting images table and widgets table would be:

select * from raz1_widgets w, raz1_images i
where w.folder_id_r = i.folder_id_r

But… I got really small set of records… I have table images (17k records) and widgets (9k records). Each widget has different set of images. But when I try to run above query - I get 1.5k records that match…
I checked couple of records - in the widgets table, value in folder_id_r does not exist in images table folder_id_r…
But widgets clearly shows image.

Any idea?

Huh? What are you trying to achieve?

More information please.

I group images, documents in collections and make widgets which link I connect to my “product” info.
But now I need information which image belongs to certain widget.
I would like to connect product to image(s) also directly.

I hope it is possible… Any idea?

Please see this thread https://forums.razuna.org/topic/widget-to-image-link