public function FrxMSSQL::searchTableColumns in Forena Reports 8
Perform search of tables.
Overrides DriverBase::searchTableColumns
See also
FrxDataSource::searchTables()
File
- src/
FrxPlugin/ Driver/ FrxMSSQL.php, line 188 - Oracle specific driver that takes advantage of oracles native XML support
Class
- FrxMSSQL
- Class FrxMSSQL
Namespace
Drupal\forena\FrxPlugin\DriverCode
public function searchTableColumns($table, $str) {
$str .= '%';
$db = $this->db;
$sql = $this
->searchTableColumnsSQL();
$str = "'" . str_replace("'", "''", $str) . "'";
$sql = str_replace(':str', $str, $sql);
$table = "'" . str_replace("'", "''", $table) . "'";
$sql = str_replace(':table', $table, $sql);
$rownum = 0;
$rs = mssql_query($sql, $db);
$columns = array();
if ($rs) {
while ($row = mssql_fetch_assoc($rs)) {
$columns[] = $row['COLUMN_NAME'];
}
}
if ($rs) {
mssql_free_result($rs);
}
return $columns;
}