I have a mysql table as follows:
users:
id | active | status | fname | lname | password
The result of "select*from users" is stored in memcache.
Lets say that I have 50 users, and rather than using php to format the results of the select*query, is it possible to just send the result of the query directly to javascript?
I would like php to do as little as possible: ie,
1) retrieve data from memcache/mysql
2) send $rows array to javascript (where $rows is the result of select*from users)
Javascript can then loop over the retrieved array to display the data in html.
QUESTION:
Is it possible to send result array directly to javascript, where the data can be looped over and outputted in html?
Is this a valid optimisation technique?
Are there any suggestions on how to perform this?
Any suggestions appreciated...