PClib demo site

<?php
/* project: Basic grid, file: basicgrid.php */

//Include pclib framework
require 'pclib/pclib.php';

//Create pclib application
$app = new PCApp('demo');

$datasource 'mysql://root@localhost/test';

//Connect to database and register it as $app->db
$app->db = new PCDb($datasource);

//Initialize grid template, set grid query and write grid out
$grid = new PCGrid('tpl/basicgrid.tpl');

$grid->setQuery('select * from PRODUCTS');
//You can put additional values into grid template
$grid->values['TITLE'] = 'Basic features of the grid';

//Show the grid! Also functions $grid->out() and $grid->html() can be used.
print $grid;

?>

Elapsed time: 1.74 ms