PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Erh-Wen,Kuo  >  sql2table  >  example.php  >  Download  
File: example.php
Role: ???
Content type: text/plain
Description: Example file to demostrate how to use sql2table class
Class: sql2table
Easy way to display Mysql sql content.
Author: By
Last change:
Date: 20 years ago
Size: 1,179 bytes


Class file image Download
	//include sql2table class
	//the query string you want to show
	$query="Select * From employees";
	//setup parameters for initiating Sql2Table instance
	//modify your mysql connection parameters & database name
	//create a new instance of Sql2Table class
	$obj=new Sql2Table($db_host,$db_user,$db_pwd,$db_dbname);
	//setup the page display limit
	//initiate $offset variable is necessary
	//SqlStart() is the main class method to do the trick		
	//Show information
	//GetNav() method would return navigation bar string
	//GetPages() method would return display pages string
	//GetGrids() method would return the content of Sql into HTML table format
	echo $obj->GetGrids()."<br>";
	//ShowTable() method would return a string combine Pages,Navigation&Sql Content
	//in HTML table format. Easy for debugging!!
	echo $obj->ShowTable();
For more information send a message to info at phpclasses dot org.