pivottable.inc.php File Reference

Go to the source code of this file.

Functions

 PivotTableSQL (&$db, $tables, $rowfields, $colfield, $where=false, $aggfield=false, $sumlabel='Sum ', $aggfn='SUM', $showcount=true)

Variables

print< pre > $sql
 $rs = $gDB->Execute($sql)
 $sql
print< pre > $sql
 $rs = $gDB->Execute($sql)


Function Documentation

PivotTableSQL &$  db,
tables,
rowfields,
colfield,
where = false,
aggfield = false,
sumlabel = 'Sum ',
aggfn = 'SUM',
showcount = true
 

Version:
V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jlim@natsoft.com.my). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence.
Set tabs to 4 for best viewing.

Latest version is available at http://php.weblogs.com

Requires PHP4.01pl2 or later because it uses include_once

Definition at line 34 of file pivottable.inc.php.


Variable Documentation

$rs = $gDB->Execute($sql)
 

Definition at line 168 of file pivottable.inc.php.

$rs = $gDB->Execute($sql)
 

Definition at line 122 of file pivottable.inc.php.

print<pre> $sql
 

Definition at line 167 of file pivottable.inc.php.

$sql
 

Initial value:

 PivotTableSQL(
        $gDB,                                                                           # adodb connection
        'products p ,categories c ,suppliers s',        # tables
        'CompanyName,QuantityPerUnit',                          # row fields
                                                                                                # column ranges
array(                                                                          
' 0 ' => 'UnitsInStock <= 0',
"1 to 5" => '0 < UnitsInStock and UnitsInStock <= 5',
"6 to 10" => '5 < UnitsInStock and UnitsInStock <= 10',
"11 to 15"  => '10 < UnitsInStock and UnitsInStock <= 15',
"16+" =>'15 < UnitsInStock'
),
        ' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where
        'UnitsInStock',                                                         # sum this field
        'Sum'                                                                           # sum label prefix
)

Definition at line 151 of file pivottable.inc.php.

print<pre> $sql
 

Definition at line 121 of file pivottable.inc.php.


Generated on Fri Apr 7 10:48:42 2006 for TYPO3 by  doxygen 1.4.6