$database->escapeOperator() method

Sanitize comparison operator

Usage

// basic usage
$string = $database->escapeOperator(string $operator);

// usage with all arguments
$string = $database->escapeOperator(string $operator, $operatorType = 0, string $default = '=');

Arguments

NameType(s)Description
operatorstring
operatorType (optional)bool, int, null

Specify a WireDatabasePDO::operatorType* constant (default=operatorTypeComparison)

default (optional)string

Default/fallback operator to return if given one is not valid (default='=')

Return value

string


$database methods and properties

API reference based on ProcessWire core version 3.0.178

Twitter updates

  • ProcessWire 3.0.181 has fixes and improvements as usual, but the biggest addition is a nice pull request for multi-language module translations, plus major updates to our Helloworld and ProcessHello demonstration modules. This post covers it all— More
    2 July 2021
  • ProcessWire 3.0.180 core updates– More
    18 June 2021
  • Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we’ll take a closer look at in this post— More
    11 June 2021

Latest news

  • ProcessWire Weekly #374
    In the 374th issue of ProcessWire Weekly we're going to cover the latest core updates, check out a total of three newly released third party modules, and more. Read on!
    Weekly.pw / 10 July 2021
  • ProcessWire 3.0.181 core updates + “Hello World”
    ProcessWire 3.0.181 has fixes and improvements as usual, but the biggest addition is a nice pull request from LostKobrakai, plus major updates to our Helloworld and ProcessHello demonstration modules. This post covers it all.
    Blog / 2 July 2021
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull