Arrow_left   Arrow_right
 
  #43

IgnitedQuery::alias should have an optional protect_identifiers argument

    • Created on: Tue, 19 May 2009 (over 2 years ago)
    • Reported by: Stan Angeloff
    • Assigned to: -
    • Milestone: 1.0
    • Status: Fixed
    • Priority: Normal (3)
    • Component: -
    The following is the alias function reworked to introduce another argument protect_identified. This will prevent aliased sub-queries being escaped twice:


    	/**
    	 * Specifies an alias for this subquery.
    	 *
    	 * Note: This only applies if this object is a subquery
    	 *
    	 * @access public
    	 * @param string The alias
    	 * @param bool		If to protect identifiers
    	 *
    	 * @return $this
    	 */
    	function &alias($alias, $protect_identifiers = true)
    	{
    		if($this->q_as !== false)
    			$this->q_as = ($protect_identifiers ? $this->_protect_identifiers($alias) : $alias);
    
    		return $this;
    	}


    Cheers,
    Stan
  • Followers
     
    Ico-users Stan Angeloff 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on May 19, 2009 @ 10:45PM UTC * By m4rw3r

    Status changed from New to Fixed
    (In revision:279) Fixes #42, #43, #44 and #45
    Thanks for spotting those Stan!
    Time Expenditure
    Loading