Gdn_SQLDriver::fetchTables PHP Method

fetchTables() public method

Returns an array containing table names in the database.
public fetchTables ( mixed $LimitToPrefix = false ) : array
$LimitToPrefix mixed Whether or not to limit the search to tables with the database prefix or a specific table name. The following types can be given for this parameter: - TRUE: The search will be limited to the database prefix. - FALSE: All tables will be fetched. Default. - string: The search will be limited to a like clause. The ':_' will be replaced with the database prefix.
return array
    public function fetchTables($LimitToPrefix = false)
    {
        $Sql = $this->fetchTableSql($LimitToPrefix);
        $Data = $this->query($Sql);
        $Return = array();
        foreach ($Data->resultArray() as $Row) {
            if (isset($Row['TABLE_NAME'])) {
                $Return[] = $Row['TABLE_NAME'];
            } else {
                $Return[] = array_shift($Row);
            }
        }
        return $Return;
    }