<?php
/* ***************************************************
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_table($query);
//$grid->create_paging_table($query, $pk, $data_per_page);
$grid->create_data_search($query, $srcfield, $pk, $data_per_page);
?>
|