D
D
D0UBL32020-07-01 18:55:21
PHP
D0UBL3, 2020-07-01 18:55:21

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

1 answer(s)
S
Sergey Vodakov, 2020-07-02
@WaterSmith

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 question

Ask a Question

731 491 924 answers to any question