');
foreach(array_keys($aLine) as $item)
{
if (!is_numeric($item))
{
$aCols[] = $item;
$oP->add("
$item
");
}
}
$oP->add('
');
foreach($aRes as $aLine)
{
$oP->add('
');
foreach($aCols as $sCol)
{
$oP->add("
".$aLine[$sCol]."
");
}
$oP->add('
');
}
$oP->add('
');
$oP->add('
');
}
else
{
$oP->add("
No Result
\n");
}
}
catch (Exception $e)
{
$oP->p('
'.$e->getMessage().'
');
$bError = true;
}
$oP->add("
$sSQL
\n");
$oP->output();
return;
/*
echo "
";
$aClassSelection = MetaModel::GetClasses();
foreach($aClassSelection as $sClass)
{
if (!MetaModel::HasTable($sClass))
{
continue;
}
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
{
// Skip this attribute if not defined in this table
if (!MetaModel::IsAttributeOrigin($sClass, $sAttCode))
{
continue;
}
switch (get_class($oAttDef))
{
case 'Integer':
case 'AttributeDecimal':
case 'AttributeDuration':
case 'AttributeSubItem':
case 'AttributePercentage':
echo "$sClass:$sAttCode = ".get_class($oAttDef)."\n";
break;
}
}
}
*/