Login   Register  
PHP Classes

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Budi Laxono  >  tGrid  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample file
Class: tGrid
Display database query results in an HTML table
Author: By
Last change:
Date: 5 years ago
Size: 1,146 bytes


Class file image Download
/* ***************************************************
Sample file to generate datagrid instantly
(c) budi laxono (28-05-2008)

**************************************************** */

include "tableGrid.php";

$dbtype ="mssql";//mssql / mysql / pgsql
$srvname ="mssqlserver";
$dbname ="mssqldb";
$uname ="mssqluser";
$pass ="mssqlpass";
$port ="";
$query "SELECT * FROM table";
$pk "table_primary_key";
$srcfield "table_data_search";
$data_per_page 5;

$dbtype ="mysql";//mssql / mysql / pgsql
$srvname ="mysqlserver";
$dbname ="mysqldb";
$uname ="mysqluser";
$pass ="mysqlpass";
$port ="";
$query = "SELECT * FROM table";
$data_per_page = 5;
$dbtype ="pgsql";//mssql / mysql / pgsql
$srvname ="pgsqlserver";
$dbname ="pgsqldb";
$uname ="pgsqluser";
$pass ="pgsqlpass";
$port ="";
$query = "SELECT * FROM table";
$data_per_page = 5;

$grid = new TableGrid($dbtype$srvname$dbname$uname$pass$port);

//$grid->create_paging_table($query, $pk, $data_per_page);