private function getTables($tables)
    {
        $names = '';
        $i = 0;

        foreach ($tables as $table) {
            $names .= $table;
            $i++;

            if (count($tables) > $i) {
                $names .= ',';
            }
        }

        return $names;
    }