You are here

public function FrxPDO::searchTables in Forena Reports 7.4

Method to return an array of tables that start with the string indicated in $str

Parameters

$str Name of tables.:

Return value

multitype:

Overrides FrxDataSource::searchTables

File

plugins/FrxPDO.inc, line 225
General database engine used to do sql queries.

Class

FrxPDO
@file General database engine used to do sql queries.

Code

public function searchTables($str) {
  $str .= '%';
  $sql = $this
    ->searchTablesSQL();
  if ($sql) {
    $st = $this->db
      ->prepare($sql);
    if ($st) {
      $st
        ->execute(array(
        ':str' => $str,
      ));
    }
    if ($st) {
      return $st
        ->fetchAll(PDO::FETCH_COLUMN, 0);
    }
  }
}