+ add ge() and le() method.
This commit is contained in:
@@ -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"
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user