function getTables($f = array()) { $where = array(); if (count($f) > 0) { foreach ($f as $t) { if ($where != "") { $where .= ' OR '; } $where[] = '(table_name = "' . $t . '")'; } } if (count($where) > 0) { $where = ' where ' . implode(" OR ", $where); } else { $where = ''; } $tb = rex_sql::factory(); // $tb->debugsql = 1; $tb->setQuery('select * from rex_xform_table ' . $where . ' order by prio,name'); $return = ""; foreach ($tb->getArray() as $t) { $return[$t["table_name"]] = rex_xform_manager_table::factory($t); if (!$return[$t["table_name"]]->isValid()) { unset($return[$t["table_name"]]); } } return $return; }