P
P
pikapika2018-06-05 12:39:43
JavaScript
pikapika, 2018-06-05 12:39:43

How to display data from the database using two different functions?

I have a web application. The application displays all users and current. debt. To display a list of users, there is a special function on the server, which I refer to. And to display the debt of an individual user, there is also a separate method on the server (requires a user id at the input). I need to display a list of all users and the current debt, as in fig. 5b165a21dfba8890505897.pngThe question is how to do it? To do this, you need to rewrite the method on the server so that the debt is also displayed with a list of users? Guys, help me, I'm stupid as an oak in programming! I will be glad to any answer and any considerations.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DENIS Kokorev, 2018-06-05
@shmaroder

Yes. To do this, you need to rewrite the method on the server so that the debt is displayed with the list of users.
You answered your own question.

K
Konstantin Borovik, 2018-06-05
@PushMeNow

Well, in your database, debts are probably marked with identifiers for communication with users. rewrite the code on the server side, use join to connect them, and give out the finished result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question