First, I should admit that I didn't do a lot of searching beforehand, I'm just cutting to the chase to ask the experts: I'm currently running MySQL 5 queries with PHP 5.2.3 and returning results to the end-user in web-page tables of ca. 50 rows by 5 columns. I'd like to (more or less) simultaneously return to the browser a couple of "canned" charts and graphs based on the data. Nothing fancy, two pie charts and two simple bar-charts to start. I need to generate these on-the-fly, based on the results of the MySQL query, and display them in the web-page, beside the table data. What's the best reference, if there is one, for PHP, MySQL, R integration? [[alternative HTML version deleted]]
MASFERFC Team <masferfc <at> gmail.com> writes:> I'm currently running MySQL 5 queries with PHP 5.2.3 and returning results > to the end-user in web-page tables of ca. 50 rows by 5 columns. I'd like to > (more or less) simultaneously return to the browser a couple of "canned" > charts and graphs based on the data. Nothing fancy, two pie charts and two > simple bar-charts to start. I need to generate these on-the-fly, based on > the results of the MySQL query, and display them in the web-page, beside the > table data. > > What's the best reference, if there is one, for PHP, MySQL, R integration?It's not the best, but it's simple, works for all our sites and comes with a sample: package phpSerialize. Graphs are should be written to a file as png and linked via standard HTML. Dieter
> > What's the best reference, if there is one, for PHP, MySQL, R integration? >It is possible to integrate PHP, R and MySQL, but I don't have a good reference for you. If all you need are a few simple charts, then I think it would be easiest for you to forget about R and use some other solution. One example is a flash-based solution: http://www.maani.us/charts/index.php, but there are many others out there. There are examples on this site with code that make it pretty simple to adapt to your situation.
On 8/22/07 1:31 PM, MASFERFC Team wrote:> I'd like to > (more or less) simultaneously return to the browser a couple of "canned" > charts and graphs based on the data. Nothing fancy, two pie charts and two > simple bar-charts to start. I need to generate these on-the-fly, based on > the results of the MySQL query, and display them in the web-page, beside the > table data. > > What's the best reference, if there is one, for PHP, MySQL, R integration?I'm quite new to R myself, and hope to read about your experiences further on down the road. I thought I'd mention that we use PHP/SWF Charts in a similar environment for similar purposes, though I'm hoping to extend the complexity of what we report using R. http://maani.us/charts/index.php Cheers, Eric