+ add ge() and le() method.

This commit is contained in:
wangchunsheng
2011-12-29 06:32:18 +00:00
parent 4c77611bd6
commit 9230a53e22
+28
View File
@@ -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"
*