PDA

View Full Version : database queries and JSON



lormitto
21 Mar 2010, 1:33 AM
Hi,

Do you know if there is any way to put results of multiple queries in one JSON delivery?
While opening tab i need to present data from different queries so now I execute few queries and send results few times. It would be efficient to send only one time for all queries and process data in extjs application.

Regards,

Elijah
21 Mar 2010, 11:01 AM
I would think you could server side
1. Create a JSON object
2. Loop over query set
3. For each record add an entry to the JSON object

Do #2 and #3 over for each query set

4. Return the created JSON object back to the caller.