Answer the question
In order to leave comments, you need to log in
How to compare an array with a database and return a boolean value?
I have an array with non-unique values as input. I need to compare this array to see if the value from the array matches any row in the table and return false if the match is not found or true if the value is found, that is, if the array has 10 elements, then in the response from the base I should get 10 elements . How can i do this?
Answer the question
In order to leave comments, you need to log in
Make a query to the database, with selection by values from the array. If the result contains as many rows as there are elements in the array, return true otherwise false
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question