How do you query another table using the foreign k...
# help
b
How do you query another table using the foreign keys? I have some information in my profiles table and resources table. The below doesn't seem to work.
Copy code
const {data: resources} = await supabase.from('resources').select("*",`profiles(*)`)
s
You haven't provided much context here for someone to help, what does your table schema look like? what does doesn't work mean in this case?
b
I was able to work it out, the issue was that my foreign key wasn't linked to the correct table.
And when I queried it, it kept coming up with undefined.
But for future reference, how do I structure the code so I get an error message on what is being queried? Or would I have to just try to trouble shoot and find out by myself why no data is returning