public function FrxDrupal::searchTableColumns in Forena Reports 7.4
Generate a list of columns for a table.
Parameters
unknown $table:
unknown $str:
Return value
An
Overrides FrxDataSource::searchTableColumns
File
- plugins/
FrxDrupal.inc, line 46 - Provides data blocks for native drupal connections using the default drupal connections.
Class
- FrxDrupal
- @file Provides data blocks for native drupal connections using the default drupal connections.
Code
public function searchTableColumns($table, $str) {
$str .= '%';
$table = trim($table, '{} ');
$key = $this->database ? $this->database : 'default';
$info = Database::getConnectionInfo($key);
$database = $info[$key]['database'];
$rs = db_query($this
->searchTableColumnsSQL(), array(
':str' => $str,
':database' => $database,
':table' => $table,
));
if ($rs) {
return $rs
->fetchCol();
}
}