PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 51%Total: 14,236 All time: 72 This week: 96Down
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: 44
All time rank: 442 in Bangladesh Bangladesh
Week rank: 346 Down7 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  
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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:14,236
This week:0
All time:72
This week:96Down
User Ratings User Comments (2)
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:2296
 
wow lib thanks
7 years ago (muabshir)
70%StarStarStarStar
Judging from your source, this is just a plain and simple mys...
12 years ago (Jim Foo)
27%StarStar