You are here

public function FrxMSSQL::searchTables in Forena Reports 8

Perform search of tables.

Overrides DriverBase::searchTables

See also

FrxDataSource::searchTables()

File

src/FrxPlugin/Driver/FrxMSSQL.php, line 167
Oracle specific driver that takes advantage of oracles native XML support

Class

FrxMSSQL
Class FrxMSSQL

Namespace

Drupal\forena\FrxPlugin\Driver

Code

public function searchTables($str) {
  $str .= '%';
  $db = $this->db;
  $sql = $this
    ->searchTablesSQL();
  $str = "'" . str_replace("'", "''", $str) . "'";
  $sql = str_replace(':str', $str, $sql);
  $rownum = 0;
  $rs = mssql_query($sql, $db);
  $tables = array();
  while ($row = mssql_fetch_assoc($rs)) {
    $tables[] = $row['table_name'];
  }
  if ($rs) {
    mssql_free_result($rs);
  }
  return $tables;
}