Link to home
Start Free TrialLog in
Avatar of chongchian
chongchianFlag for Singapore

asked on

PHP Reporting System

Hi All,

I'm in the process of building a PHP-based reporting system. I've previously did so easily with ASP.NET's Reporting Services. I was wondering if PHP does have any sort of similar frameworks that I can take advantage of for this purpose?

--
Thks.
Avatar of themrrobert
themrrobert
Flag of United States of America image

You have to be more specific. We are NOT mind readers. While we are extremely smart and appear to read minds, we have NO idea what you are trying to report.

If you want to make reports of sql tables, do it yourself. I'm sure you can find them on google if you really want to.

SELECT * FROM `table` WHERE 1 ORDER BY `time` SORT DESC

use PEAR::DB or MDB2 and then:

$db->setFetchMode(DB_FETCHMODE_ASSOC);
$ret = $db->getAll($sql);

$hs = $row[0];
$header_html = ''; //generate headers \/
foreach($hs as $k=>$v) {
$header_html .= "<th>$k</th>";
}

foreach($ret as $row) {
$html .= "<tr>";
foreach($row as $k => $v )
{
$html .= "<td>$v</td>";
}
$html .= "</tr>";
}

$html = "<table><tr>${header_html}</tr>$html</table>";

echo $html;

BAM report done

Avatar of chongchian

ASKER

Hi themrrobert, thank you for your advice and rapid feedback, which I am gateful for . :)

Basically, I've a database of info and couple select scripts, from which, I would be required to make use of PHP to allow others to view those info via the browser.

This is really simple if I were to make use of the mysql_connect, mysql_select_db and mysql_fetch_row.

However, what I hope to do is to make it really rich like even AJAX enabled and having the ability to export it to PDF, Excel, etc.
ASKER CERTIFIED SOLUTION
Avatar of kumaranmca
kumaranmca

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial