You are here

public function FrxDataSource::listDBBlocks in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 FrxDataSource.inc \FrxDataSource::listDBBlocks()
1 call to FrxDataSource::listDBBlocks()
FrxDataSource::list_blocks in ./FrxDataSource.inc
Find all the blocks matching a provided search string

File

./FrxDataSource.inc, line 173
Class that defines default methods for access control in an FrxDataSource

Class

FrxDataSource
@file Class that defines default methods for access control in an FrxDataSource

Code

public function listDBBlocks($search, &$data_blocks) {
  $search = '%' . $search . '%';
  $sql = 'SELECT * from {forena_data_blocks} WHERE repository=:repos
      AND block_name like :search ';
  $rs = db_query($sql, array(
    ':repos' => $this->name,
    ':search' => $search,
  ));
  foreach ($rs as $block) {
    $data_blocks[] = $block->block_name;
  }
}