Skip to content
PHP Ecosystem
Explore

BetweenConditionBuilder

API reference › yii › db › conditions › BetweenConditionBuilder

classyii\db\conditions\BetweenConditionBuilder
Implementsyii\db\ExpressionBuilderInterface
Uses traitsyii\db\ExpressionBuilderTrait
Since2.0.14
Sourceframework/db/conditions/BetweenConditionBuilder.php

Class BetweenConditionBuilder builds objects of BetweenCondition

PropertyTypeDescriptionDefined by
$queryBuilder protectedyii\db\QueryBuilderDefault: null.yii\db\ExpressionBuilderTrait
MethodDescriptionDefined by
__construct()ExpressionBuilderTrait constructor.yii\db\ExpressionBuilderTrait
build()Method builds the raw SQL from the $expression that will not be additionally escaped or quoted.BetweenConditionBuilder
createPlaceholder() protectedAttaches $value to $params array and returns placeholder.BetweenConditionBuilder
public function build(yii\db\ExpressionInterface|yii\db\conditions\BetweenCondition $expression, array &$params = []): string

Method builds the raw SQL from the $expression that will not be additionally escaped or quoted.

Parameters

ParameterTypeDescription
$expressionyii\db\ExpressionInterface|BetweenConditionThe expression to be built.
$paramsarrayThe binding parameters.

Returns

string: The raw SQL that will not be additionally escaped or quoted.

protected function createPlaceholder(mixed $value, array &$params): string

Attaches $value to $params array and returns placeholder.

Parameters

ParameterTypeDescription
$valuemixed
$paramsarrayPassed by reference

Returns

string