Answer the question
In order to leave comments, you need to log in
What is the best way to fetch from a database?
I want to draw statistics on the site for keywords. The statistics itself is stored in the
Date Word How ManyDayDayMet
Example:
2008-08-21 Vasya 5
2008-08-21 Petya 1
2008-08-21 Vova 2
2008-08-22 Vasya 3
2008-08-22 Petya 1
2008-08-22 Vova 1
Actually I want to write a simple rest interface that would give this data to a JS script, but here's the question. How to do it better? Is it possible to give this data somehow in json format? Or is another form of return needed? There is also a key-value, and here there is also a frequency of occurrence.
The output should just be a graph.
Answer the question
In order to leave comments, you need to log in
[
{"date": "2008-08-21", "name": "Вася", "count": "5" },
{"date": "2008-08-21", "name": "Петя", "count": "1" }
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question