修改好了，在sum里面进行了替换
请重新review


On May 7, 2014, at 11:17 AM, Jia Huang <notifications@github.com> wrote:

> In libraries/q.php:
> 
> >  	protected $sum_SQL;
> > -	function sum($name) {
> > -		$this->parse();
> > -		$SQL = strtr($this->sum_SQL, array('%name'=>$this->db->escape($name)));	
> > -		return $this->db->value($SQL);
> > -	}
> > -
> > +    function sum($field) {
> > +        $this->sum_field = $field;
> > +        $this->parse();
> > +        return $this->db->value($this->sum_SQL);
> 这个pattern处理我觉得不应该放在parse里面...
> parse是有静态变量缓冲的吧, 只运行一次... 这个替换应该在这个sum里面进行替换吧...
> 
> —
> Reply to this email directly or view it on GitHub.
>