private function asScalarSubQuery($callback, $default = false) 
	{
		$sql = $this->sql;
		
		$this->sql = $callback($sql);
		$result = $this->queryScalar(null);
		$this->sql = $sql;
		
		return (is_null($result) ? $default : $result);
	}