R
R
RudMa2021-11-30 13:26:17
AJAX
RudMa, 2021-11-30 13:26:17

How to make a get request with a selection by id?

Hello! I need to contact the server to update the data in the cart. And accordingly, I do not need all the goods, but only those that are in it. Is there an idea that you need to loop through the data array and take those that have the same id? Is it only possible to use a loop in a query? Haven't found any information about this anywhere. How is it done correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
irishmann, 2021-11-30
@irishmann

It is better to go through the data, collect an array of identifiers, send it in one request to the server. On the server, implement a method that accepts this array, climbs into the database, pulls out the necessary information and sends it to the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question