query 2 databases

Hello Wix code users.
Happy New Year.
Im new to wix code so i would like your help.
I have database A and database B.
Then when the page loads with the results from the database A i want that specific fields be the result to query in database B.
On table A i have personnal ID´s and names and on the table B i have their fotos.
So on the page the textbox (from table A) shows me “121” and i want that the imagebox (from table B) show the picture.
With this i avoid duplicate data in the databases.
Thanks!

Seems that the best solution for you is to use a Reference Field. You can get some info here - CMS: About Displaying Content from Multiple Database Collections Using Reference Fields | Help Center | Wix.com or https://www.wix.com/code/home/forum/questions-answers/adding-record-with-a-reference-field

Thanks Ohad!
i will check your solution.

It works.
thanks for your support!