PHP Classes

File: usage.php

Recommend this page to a friend!
  Classes of Rajesh Kakkad   PHP MySQLi Report Generator class   usage.php   Download  
File: usage.php
Role: Example script
Content type: text/plain
Description: example usage file
Class: PHP MySQLi Report Generator class
Generate HTML reports from queries using MySQLi
Author: By
Last change: used little bit more complex query to show users that it can use more complex queries to generate report
Date: 7 years ago
Size: 994 bytes


Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

= mysqli_connect("localhost","agent","agent_123","r4agent");

// Check connection
if (mysqli_connect_errno())
"Failed to connect to MySQL: " . mysqli_connect_error();
$prg = new phpReportGenerator();
$prg->width = "100%";
$prg->cellpad = "0";
$prg->cellspace = "0";
$prg->border = "0";
$prg->header_color = "#666666";
$prg->body_alignment = "left";
$prg->body_color = "#CCCCCC";
$prg->body_textcolor = "#800022";
$prg->surrounded = '1';

$res = mysqli_query($con,"select * from agents where id>500");
$prg->mysqli_resource = $res;
$prg->title = "Test Table";