* Return tables in database WITHOUT current prefix
* @return array of table names in lowercase and without prefix
*/
- public function get_tables($prefix=null) {
+ public function get_tables() {
$metatables = $this->adodb->MetaTables();
$tables = array();
- if (is_null($prefix)) {
- $prefix = $this->prefix;
- }
-
foreach ($metatables as $table) {
$table = strtolower($table);
- if (empty($prefix) || strpos($table, $prefix) === 0) {
- $tablename = substr($table, strlen($prefix));
+ if (empty($this->prefix) || strpos($table, $this->prefix) === 0) {
+ $tablename = substr($table, strlen($this->prefix));
$tables[$tablename] = $tablename;
}
}
* Return tables in database WITHOUT current prefix
* @return array of table names in lowercase and without prefix
*/
- public abstract function get_tables($prefix=null);
+ public abstract function get_tables();
/**
* Return table indexes - everything lowercased
* Return tables in database WITHOUT current prefix
* @return array of table names in lowercase and without prefix
*/
- public function get_tables($prefix=null) {
+ public function get_tables() {
$tables = array();
- if (is_null($prefix)) {
- $prefix = $this->prefix;
- }
-
$sql = 'SELECT name FROM sqlite_master WHERE type="table" UNION ALL SELECT name FROM sqlite_temp_master WHERE type="table" ORDER BY name';
if ($this->debug) {
$this->debug_query($sql);
foreach ($rstables as $table) {
$table = $table['name'];
$table = strtolower($table);
- if (empty($prefix) || strpos($table, $prefix) === 0) {
- $table = substr($table, strlen($prefix));
+ if (empty($this->prefix) || strpos($table, $this->prefix) === 0) {
+ $table = substr($table, strlen($this->prefix));
$tables[$table] = $table;
}
}