Hello everyone! I'm trying to write a function tha...
# sql
h
Hello everyone! I'm trying to write a function that receives as an argument an array of "ids", then I want to check for every id provided if: - A row in a table exists with that id - And if exists, that some column = true And finally if all provided "ids" passes this validation, insert a row for each id in a table. The use case is for an chat app where the user can subscribe to multiple rooms at once if the room exists and its public. Does anyone has an idea now can I handle it? I'm trying different approaches without much success yet thanks in advance!