+ function listTables( $prefix = null, $fname = 'DatabaseOracle::listTables' ) {
+ $listWhere = '';
+ if (!empty($prefix)) {
+ $listWhere = ' AND table_name LIKE \''.strtoupper($prefix).'%\'';
+ }
+
+ $result = $this->doQuery( "SELECT table_name FROM user_tables WHERE table_name NOT LIKE '%!_IDX$_' ESCAPE '!' $listWhere" );
+
+ // dirty code ... i know
+ $endArray = array();
+ $endArray[] = $prefix.'MWUSER';
+ $endArray[] = $prefix.'PAGE';
+ $endArray[] = $prefix.'IMAGE';
+ $fixedOrderTabs = $endArray;
+ while (($row = $result->fetchRow()) !== false) {
+ if (!in_array($row['table_name'], $fixedOrderTabs))
+ $endArray[] = $row['table_name'];
+ }
+
+ return $endArray;
+ }
+
+ public function dropTable( $tableName, $fName = 'DatabaseOracle::dropTable' ) {
+ $tableName = $this->tableName($tableName);
+ if( !$this->tableExists( $tableName ) ) {
+ return false;
+ }
+
+ return $this->doQuery( "DROP TABLE $tableName CASCADE CONSTRAINTS PURGE" );
+ }
+