I have two collections (why don't you call them tables?) "forums" and "threads".
This is a one-to-many ..... many threads can contain a reference to the same forum.
I have some code here ... the part I'm unsure on, is in bold.
forumIDString = wixLocation.url.substr(wixLocation.url.indexOf("/viewforum/") + 11);
// find the Title of the given forum
const forums = await wixData.query("forums").eq("_id", forumIDString)
var forumTitle = forums.items.title; // forum titles are unique
// find threads with the given forum title
const threads = await wixData.query("threads").eq("forumId", forums.items)
This is not working, but I'm really not sure how to handle the reference in code.
When I used to program dB years ago, the references were all text values. It seems that with wix, they are actual items in the other collection.