How to read a mySQL query (through PHP) into JavaScript variables using AJAX?
Hi,
I have written an AJAX program that interfaces with a mySQL database through PHP pages. Inserting records is no problem at all but I have not figured out how to read a query into individual JavaScript variables yet.
You have the PHP page return text that creates a JavaScript array, e.g.:
<?php
echo "var myArray = new Array('apple', 'banana', 'pear');";
?>
Then you call eval() on that response text in JavaScript:





Cache your AJAX – apparently it's quite easy to cache AJAX in order to save time on repetitive requests. 15. Switch to a faster server – SEOptimise switched to a faster server, or rather web hosting provider, a while ago. The old one was slowing down
The smart Ajax-based interface has been improved with a firmware upgrade and is simple to use. RAID support is good, and for testing we put all four 1TB drives into a RAID5 array that took around six hours to build. The N4200Eco supports IP SANs,