Login   Register  
PHP Classes
elePHPant
Icontem

File: ex-DbTable.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of carex  >  Form Table PgSQL  >  ex-DbTable.php  >  Download  
File: ex-DbTable.php
Role: Example script
Content type: text/plain
Description: example Db Table
Class: Form Table PgSQL
Generate Web forms to access PostgreSQL tables
Author: By
Last change:
Date: 2005-09-20 22:36
Size: 2,069 bytes
 

Contents

Class file image Download
<?php
    
require 'conf/dbConf.php';
    require 
'object/database/dbConnection.php';
    require 
'object/table/tableInfo.php';
    require 
'object/table/tablePure.php';
    require 
'object/compound/pgTable.php';

    
//create new object of table
    
$tbl = new pgTable();

    
//property of table
    //set title of table
    
$tbl->SetTitleTable('Hanya untuk latihan saja');
    
//set titleSizeTable;
    
$tbl->SetTitleSizeTable('+2');
    
//set titleColorTable;
    
$tbl->SetTitleColorTable('#FF00FF');
    
//set alignTable;
    
$tbl->SetAlignTable('center');
    
//set colorBgTable;
    
$tbl->SetColorBgTable('#CCFFFF');
    
//set widthTable;
    
$tbl->SetWidthTable('70%');
    
//set heighTable;
    
$tbl->SetHeighTable('80%');
    
//set borderWidthTable;
    
$tbl->SetBorderWidthTable('0');
    
//set borderColorTable;
    
$tbl->SetBorderColorTable('#000000');
    
//set cellPaddingTable;
    
$tbl->SetCellPaddingTable('2');
    
//set cellSpacingTable;
    
$tbl->SetCellSpacingTable('0');

    
//property of Cols
    //set titleCols;
    
$tbl->SetTitleCols(array('Nama Base','Posisi Base','Perangkat Base'));
    
//set colorTitleCols;
    
$tbl->SetColorTitleCols('#99CC00');
    
//set widthCols;
    
$tbl->SetWidthCols(array('40%','40%','20%'));
    
//set numCols;
//    $tbl->SetNumCols('4');
    //set numRows;
//    $tbl->SetNumRows('6');
    //set dataCols;
/*    $tbl->SetDataCols(
         array(
            array('wahyu','laki-laki','jebres','kediri'),
            array('cahyo','laki-laki','wonogiri','kalimantan'),
            array('arip','laki-laki','mojosongo','solo'),
            array('nana','perempuan','solo','bali'),
            array('ana','perempuan','solo','cirebon'),
            array('fitriya','perempuan','boyolali','solo')
        )
    );
*/
    
$tbl->SetPgQuery("SELECT nama,posisi,perangkat FROM sch_user.t_base");
    
$tbl->SetOptQuery('SELECT');
    
$tbl->DataTable();
    
    
//create instant
    
$isi=$tbl->CreateOfTable();

    
//output
    
print $isi;

?>