(No version information available, might only be in Git)
CollectionModify::bind — Bind value to query placeholder
$placeholder_values
)Bind a parameter to the placeholder in the search condition of the modify operation.
The placeholder has the form of :NAME where ':' is a common prefix that must always exists before any NAME where NAME is the name of the placeholder. The bind method accepts a list of placeholders if multiple entities have to be substituted in the search condition of the modify operation.
placeholder_values
Placeholder values to substitute in the search condition. Multiple values are allowed and have to be passed as an array of mappings PLACEHOLDER_NAME->PLACEHOLDER_VALUE.
A CollectionModify object that can be used to execute the command, or to add additional operations.
Example #1 mysql_xdevapi\CollectionModify::bind() example
<?php
// Assuming $coll is a valid Collection object
// Add a new job to the document which field name is equal to 'Sakila'
$coll->modify('name like :param')->set("job", "Unemployed")->bind(['param' => 'Sakila'])->execute();
?>