PHP Classes

File: MySqlInfo.php

Recommend this page to a friend!
  Classes of Stefan Kientzler   PHP MySQL Table Information   MySqlInfo.php   Download  
File: MySqlInfo.php
Role: Example script
Content type: text/plain
Description: mysql queries for the report
Class: PHP MySQL Table Information
Creates a PDF report with a MySQL table structure
Author: By
Last change: use of XFPDF version 1.1.0
Date: 3 years ago
Size: 819 bytes
 

Contents

Class file image Download
<?php
require_once 'autoloader.php';
require_once
'MySqlInfoTable.php';

/**
 * generating report for MySQL Database
 *
 * @version 1.1.0
 * @author Stefanius <s.kien@online.de>
 */

$strDBHost = 'localhost';
/*
 $strDBUser = 'root';
 $strDBPwd = 'xxxx';
 $strDBName = 'xxxx';
 */
$strDBUser = 'hsg';
$strDBPwd = 'kien1';
$strDBName = 'hsg-homepage';
$oDB = mysqli_connect($strDBHost, $strDBUser, $strDBPwd, $strDBName);

$pdf = new MySqlInfoTable($oDB);

// set some file informationv and generall settings
$pdf->setInfo('MySql Information', '', 'Stefan Kientzler');
$pdf->setPageHeader('Overview of Database [' . $strDBName . ']');
$pdf->initGrid('mysqlinfotable.json');
$pdf->setLogo('images/mysql_logo.png');
$pdf->prepare();
$pdf->buildInfo();

$pdf->createPDF('mysqlinfo');