2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2008-01-09 05:18:36 +01:00
|
|
|
/**
|
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-reports
|
|
|
|
* @deprecated This should be considered alpha code; reporting needs a clean-up.
|
|
|
|
*/
|
2007-07-19 12:40:28 +02:00
|
|
|
class SQLReport extends DataReport {
|
|
|
|
protected $sql;
|
|
|
|
|
|
|
|
function __construct($name, $title, $value, $form, $fieldMap=null, $headFields = null, $sql) {
|
|
|
|
parent::__construct($name, $title, $value, $form, null, $fieldMap, $headFields);
|
|
|
|
$this->sql = $sql;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getRecords(){
|
|
|
|
$records = DB::query($this->sql);
|
|
|
|
return $records;
|
|
|
|
/*$dataobject = new DataObject();
|
|
|
|
return $dataobject->buildDataObjectSet($records, 'DataObjectSet');*/
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|