mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-01 15:28:02 +02:00
21 lines
466 B
PHP
21 lines
466 B
PHP
|
<?php
|
||
|
|
||
|
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');*/
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|