public function FrxOracle::searchTables in Forena Reports 8
Method to return an array of tables that start with the string indicated in $str
Parameters
string $str : Partial table Name to search.
Return value
array Array of tables to search. :
Overrides DriverBase::searchTables
File
- src/
FrxPlugin/ Driver/ FrxOracle.php, line 425 - Oracle specific driver that takes advantage of oracles native XML support
Class
- FrxOracle
- Class FrxOracle
Namespace
Drupal\forena\FrxPlugin\DriverCode
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;
}