summaryrefslogtreecommitdiff
path: root/demos/sqlmap/protected/pages/Sample/ProductList.php
blob: a35c40ea52a2bd58b5bb36eb3119dfd7a4a346ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

class ProductList extends TPage
{
	public function onLoad($param)
	{
		parent::onLoad($param);
		if(!$this->IsPostBack)
		{
			$sqlmap = $this->Application->Modules['petshop-sqlmap'];
			$products = $sqlmap->queryForList('SelectAllProducts');
			$this->productList->setDataSource($products);
			$this->productList->dataBind();
		}
	} 	
}

?>