How can I construct following query in xano ui ?
Here is my database structure
I want to execute following query for Identification and Access Management :
SELECT user_id,MAX(create_emp),MAX(read_emp),MAX(update_emp),MAX(delete_emp) FROM member JOIN permission_group ON member.group_id = permission_group.id GROUP BY user_id HAVING user_id = 2;
Can someone help me how can I construct this query in xano ui ?
Answers
-
You can do some backflips to do this in a single query, but I wouldn't because of the nightmare explaining it to the next person . I'd query all records the member table where the user id is X. Then in the output set an an add-on connecting to the permission_group table single record. Then I would make a value "create_emp" based on member_1.create_emp with a max filter on it. That would give me the max create_emp (identifying whether I have that permission). Do that times the other four fields.
The preceding would be much easier to explain to the next person, meaning I wouldn't have to babysit it for all time, which is, to me, a big value of putting things into a nocode backend!
Hope some of the above helps. We make Xano do backflips all the time as part of our focus on the hardest 5% at Statechange.ai daily office hours and our forum.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback