示例#1
0
 /**
  * Returns the string version of the query 
  *
  * @param  bool
  * @return string
  * @notes returns the query based on the registry
  */
 public function getQuery()
 {
     return '(' . substr(parent::getQuery(), 0, -1) . ')';
 }
示例#2
0
if(!class_exists('Eden_Mysql_Subselect')){class Eden_Mysql_Subselect extends Eden_Class{protected $_parentQuery;public static function i(){return self::_getMultiple(__CLASS__);}public function __construct(Eden_Sql_Select $parentQuery,$select='*'){Eden_Mysql_Error::i()->argument(2,'string');$this->setParentQuery($parentQuery);$this->_select=is_array($select) ? implode(',',$select) : $select;}public function getQuery(){return '('.substr(parent::getQuery(),0,-1).')';}public function setParentQuery(Eden_Sql_Select $parentQuery){$this->_parentQuery=$parentQuery;return $this;}}}