public function FrxOracle::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/
FrxOracle.inc, line 399 - Oracle specific driver that takes advantage of oracles native XML support
Class
- FrxOracle
- @file Oracle specific driver that takes advantage of oracles native XML support
Code
public function searchTables($str) {
$str = strtoupper($str) . '%';
$db = $this->db;
$sql = $this
->searchTablesSQL();
$stmt = oci_parse($db, $sql);
oci_bind_by_name($stmt, ":str", $str);
oci_execute($stmt);
$data = array();
$tables = array();
oci_fetch_all($stmt, $data, 0, 100, OCI_NUM);
foreach ($data[0] as $table) {
$tables[] = strtolower($table);
}
return $tables;
}