You should just write a small PHP page or whatever to grab your
parameters, do the MySQL dance, and return, say, a nicely formatted JSON
chunk.
I guess the data are numerical, so MySQL will abide by the IEEE-754
conventions, I believe, and so does JavaScript. You should be in the
clear for JSON encoding. You'll probably even find PHP functions that
handle JSON serialization for you!
This aside, how you get the data (Ajax or otherwise) is entirely
irrelevant to what you do with it (feeding Flotr).
--
Christophe Porteneuve aka TDD
t...@tddsworld.com
There's really nothing to it. Generating it in PHP can be done easily
enough by buuilding a nested associative array and pushing it through
json_encode (if you're using PHP >= 5.2.0 with the proper module):
On the client side, you'll just grab the "responseJSON" property of your
response object (the first arg to your callback function in your
Ajax.Request call), which will be the corresponding nested JS object
structure.