mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-04 00:37:56 +02:00
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
20 lines
344 B
PHP
20 lines
344 B
PHP
<?php
|
|
/**
|
|
* Matches on rows where the field is not equal to the given value.
|
|
*
|
|
* @package sapphire
|
|
* @subpackage search
|
|
*/
|
|
class NegationFilter extends SearchFilter {
|
|
|
|
public function apply(SQLQuery $query) {
|
|
return $query->where(sprintf(
|
|
"%s != '%s'",
|
|
$this->getDbName(),
|
|
Convert::raw2sql($this->getValue())
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
?>
|