You are here

public function FrxMSSQL::searchTables in Forena Reports 7.4

Perform search of tables.

Overrides FrxDataSource::searchTables

See also

FrxDataSource::searchTables()

File

plugins/FrxMSSQL.inc, line 144
Oracle specific driver that takes advantage of oracles native XML support

Class

FrxMSSQL
@file Oracle specific driver that takes advantage of oracles native XML support

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;
}