Originally Posted by Cyberpops
trying to pass several sql query array to further work in JS:
So the problem, as u can see is that it adds those [object, Object] values to my array.
you are adding those in in php.
i don't think you need the 3 while statements.
you should be able to do something like :
and just dump the whole result set at once. if you want the columns renamed, do it in sql using "dbName AS myName" in the SELECT.
without going into the reasons why document.write() is bad, you can view your data by using JSON.stringify() instead of coercing the objects to a string.
this is the same as php's differences between echoing a var_dump($x) -vs- just echo $x.
try something like this to get a peek:
myData= [price , min , max ]
JSON.stringiyfy(myData, null, "\t" )
or use firebug to inspect the variables in real-time without "printing" the data by replacing document.write() with console.log() or console.dir().
there are also several template libs out there than make it trivial to turn json into html using nice clean syntax. those can make debugging easier by offering advices in their error-handling routines.