PHP Classes

PHP MySQL Report Generator: Generate HTML report from MySQL query result data

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 51%Total: 14,243 All time: 72 This week: 47Up
Version License PHP version Categories
phpreportgenerator 1.0.0GNU General Publi...3HTML, Databases
Description 

Author

phpReportGenerator is a PHP class that generates customizable HTML reports with data from the result set of any MySQL SELECT query.

You need to just pass the query and a MySQL database connection resource id, customize several look and feel aspects of your report like text color, header color, table border, size, etc.. Then call generateReport function.

This class is very handy for rapid application development, as you do not need to code the table generation script.

Picture of Hasin Hayder
Name: Hasin Hayder is available for providing paid consulting. Contact Hasin Hayder .
Classes: 9 packages by
Country: Bangladesh Bangladesh
Age: 45
All time rank: 442 in Bangladesh Bangladesh
Week rank: 197 Down4 in Bangladesh Bangladesh Down
Innovation award
Innovation award
Nominee: 1x

Example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
    <?
   
include_once("phpReportGen.php");
   
$prg = new phpReportGenerator();
       
$prg->width = "100%";
   
$prg->cellpad = "0";
   
$prg->cellspace = "0";
   
$prg->border = "0";
   
$prg->header_color = "#666666";
   
$prg->header_textcolor="#FFFFFF";
   
$prg->body_alignment = "left";
   
$prg->body_color = "#CCCCCC";
   
$prg->body_textcolor = "#800022";
   
$prg->surrounded = '1';

   
mysql_connect("localhost","root","root");
   
mysql_select_db("company");
   
$res = mysql_query("select * from table1");
   
$prg->mysql_resource = $res;
   
   
$prg->title = "Test Table";
   
$prg->generateReport();
   
   
?>
</body>
</html>


  Files folder image Files (2)  
File Role Description
Plain text file phpReportGen.php Class The Base Class
Accessible without login Plain text file usage.php Example How to Use This Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:14,243
This week:0
All time:72
This week:47Up
User Ratings User Comments (2)
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:2483
 
wow lib thanks
7 years ago (muabshir)
70%StarStarStarStar
Judging from your source, this is just a plain and simple mys...
13 years ago (Jim Foo)
27%StarStar