Hi everyone,
i don't know if i'm doing something wrong or if there's a bug in Xano (cc Xano Support Chat )
Here's my problem:
i have 3 tables :
Users {user_id integer}
Industries {industry_id integer}
UserIndustries {userId integer, industryId integer}
In the last table, userId references User.user_id and industryId references Industries.industry_id (foreign keys ;) )
If an array of Industry Ids (pIndustries) is provided, i want to list only the Users which are connected to at least one of the Industries listed in the array but not any other User.
If the array is not provided, i want to list all the Users, regardless of the industries they're connected to.
In my query, i did this in the BY JOINS section :
and
If i'm not mistaken, if the array is provided, i should have ONLY the users which are connected to at least one industry listed in the array and NO USERS which are not.
If the array is not provided, i should have ALL the users, regardless of their industries (whether they have some or not).
Provided that i have users with no industries.
What am i doing wrong ?