mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +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');*/
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|