public function quoteName($name, $as = null)
	{
		$parts = (strpos($name, '.') !== false) ? explode('.', $name) : (array)$name;
		$bits  = array();

		foreach ($parts as $part)
		{
			$bits[] = sprintf($this->wrapper, $part);
		}

		// Put back together and add 'AS' clause
		$string  = implode('.', $bits);
		$string .= (isset($as)) ? ' AS ' . sprintf($this->wrapper, $as) : '';

		return $string;
	}