From 9230a53e224896905a216da2fd42b67ea993595e Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Thu, 29 Dec 2011 06:32:18 +0000 Subject: [PATCH] + add ge() and le() method. --- lib/dao/dao.class.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index 3a4b6eb371..6650d9cc67 100755 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -1421,6 +1421,20 @@ class sql return $this; } + /** + * Create '>='. + * + * @param string $value + * @access public + * @return object the sql object. + */ + public function ge($value) + { + if($this->inCondition and !$this->conditionIsTrue) return $this; + $this->sql .= " >= " . $this->quote($value); + return $this; + } + /** * Create '<'. * @@ -1435,6 +1449,20 @@ class sql return $this; } + /** + * Create '<='. + * + * @param mixed $value + * @access public + * @return object the sql object. + */ + public function le($value) + { + if($this->inCondition and !$this->conditionIsTrue) return $this; + $this->sql .= " <= " . $this->quote($value); + return $this; + } + /** * Create "between and" *